Unable to start nfs/smb/iptables and most of the services after reboot, getting error "syntax error at line 558: `=~' unexpected"

Solution Verified - Updated -

Issue

  • Unable to start nfs/smb/iptables and most of the services after reboot, getting error "syntax error at line 558: `=~' unexpected"

    # /etc/init.d/nfs start
    /etc/init.d/nfs[14]: .: syntax error at line 558: `=~' unexpected
    /etc/init.d/nfs[47]: whence: -t: unknown option
    /etc/init.d/nfs[47]: whence: -h: unknown option
    Usage: whence [-afpv] name  ...
    /sbin/service[3]: .: syntax error at line 558: `=~' unexpected
    /etc/init.d/nfs[52]: action: not found [No such file or directory]
    Starting NFS daemon: /etc/init.d/nfs[71]: daemon: not found [No such file or directory]
    
  • Also noticed the following messages in /var/log/messages:

    Oct 29 00:22:04 hostname1 kernel: FS-Cache: netfs 'nfs' registered for caching
    Oct 29 00:22:39 hostname1 kernel: portmap: server localhost not responding, timed out
    Oct 29 00:22:39 hostname1 kernel: RPC: failed to contact portmap (errno -5).
    Oct 29 00:23:14 hostname1 kernel: portmap: server localhost not responding, timed out
    Oct 29 00:23:14 hostname1 kernel: RPC: failed to contact portmap (errno -5).
    Oct 29 00:23:14 hostname1 kernel: lockd_up: makesock failed, error=-5
    

Environment

  • Red Hat Enterprise Linux 6
  • NFS
  • Bash / Ksh / sh
  • Samba, iptables & other services

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content