Skip to content

Instantly share code, notes, and snippets.

@jlgreer
Created August 7, 2011 23:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jlgreer/1130936 to your computer and use it in GitHub Desktop.
Save jlgreer/1130936 to your computer and use it in GitHub Desktop.
Proposed cf.NfsClient changes
bash-2.03# diff /var/cfengine/masterfiles/inputs/cf.NfsClient ./cf.NfsClient
3a4,6
>
> # expose to all NfsClient heaps which chat on storagenet, use filer, etc
>
7,8d9
< # expose to all NfsClient heaps which chat on storagenet, use filer, etc
< #
19,22d19
< # This is an ugly hack since portmap is gone/absorbed in RHEL6
< # We need to eval these classes with a pass since we use them in below shellcommands
< # Dont beat me up too bad, JG. This doesnt cruftify this to be even more gruesome
< # than it already is. ;)
24c21
< # expose to all NfsClient heaps which chat on storagenet, use filer, etc
---
> # check if rpcbind enabled at boot - portmap is rpcbind in rhel6
26,28c23
< # check if portmap enabled at boot
< #
< chkconfig_portmap_on = ( ReturnsZero("/bin/true" ) )
---
> chkconfig_rpcbind_on = ( ReturnsZero("/sbin/chkconfig --level 3 rpcbind" ) )
31c26
< # check if portmap is running
---
> # check if rpcbind is running
33c28
< init_portmap_running = ( ReturnsZeroShell("/bin/true" ) )
---
> init_rpcbind_running = ( ReturnsZeroShell("/etc/init.d/rpcbind status > /dev/null 2>&1" ) )
41a37,46
> # check if nfslock enabled at boot
> #
> chkconfig_nfslock_on = ( ReturnsZero("/sbin/chkconfig --level 3 nfslock" ) )
>
> #
> # check if nfslock is running
> #
> init_nfslock_running = ( ReturnsZeroShell("/etc/init.d/nfslock status > /dev/null 2>&1" ) )
>
> #
107c112
< # 2.) need portmap running
---
> # 2.) need portmap/rpcbind running
115a121
>
117c123
< # keep starting portmap above mounting nfs!
---
> # keep starting nfslock above mounting nfs!
119c125,132
< !init_portmap_running.iface01_viable.(NfsClient)::
---
> !init_nfslock_running.(NfsClient)::
> "/etc/init.d/nfslock restart > /dev/null 2>&1"
> define=init_nfslock_running
>
> #
> # keep starting portmap/rpcbind above mounting nfs!
> #
> !init_portmap_running.iface01_viable.(NfsClient.!redhat_s_6)::
121a135,139
>
> !init_rpcbind_running.iface01_viable.(NfsClient.redhat_s_6)::
> "/etc/init.d/rpcbind restart > /dev/null 2>&1"
> define=init_rpcbind_running
>
123c141
< # keep mounting nfs below bringing up $(iface01) and firing up portmap!
---
> # keep mounting nfs below bringing up $(iface01) and firing up portmap/rpcbind!
125c143
< !init_autofs_running.init_portmap_running.iface01_viable.(NfsClient)::
---
> (!init_autofs_running|init_autofs_restart).((!redhat_s_6.init_portmap_running)|(redhat_s_6.init_rpcbind_running)).iface01_viable.init_nfslock_running.(NfsClient)::
131a150,152
> !chkconfig_nfslock_on.(NfsClient)::
> "/sbin/chkconfig nfslock on"
> define=chkconfig_nfslock_on
136,137d156
< init_autofs_restart.(NfsClient)::
< "/etc/init.d/autofs restart > /dev/null 2>&1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment