Skip to content

Instantly share code, notes, and snippets.

@filler
Forked from jlgreer/cf.NfsClient.diff
Created August 9, 2011 20:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save filler/1135146 to your computer and use it in GitHub Desktop.
Save filler/1135146 to your computer and use it in GitHub Desktop.
Proposed cf.NfsClient changes
bash-2.03# diff -C5 /var/cfengine/masterfiles/inputs/cf.NfsClient ~jg685/cf.NfsClient
*** /var/cfengine/masterfiles/inputs/cf.NfsClient Fri May 27 10:32:08 2011
--- /export/home/jg685/cf.NfsClient Sun Aug 7 19:30:44 2011
***************
*** 14,41 ****
# check if portmap is running
#
init_portmap_running = ( ReturnsZeroShell("/etc/init.d/portmap status > /dev/null 2>&1" ) )
NfsClient.redhat_s_6::
! # 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. ;)
#
# expose to all NfsClient heaps which chat on storagenet, use filer, etc
#
# check if portmap enabled at boot
#
! chkconfig_portmap_on = ( ReturnsZero("/bin/true" ) )
#
# check if portmap is running
#
! init_portmap_running = ( ReturnsZeroShell("/bin/true" ) )
NfsClient::
#
# check if autofs enabled at boot
#
chkconfig_autofs_on = ( ReturnsZero("/sbin/chkconfig --level 3 autofs" ) )
#
--- 14,43 ----
# check if portmap is running
#
init_portmap_running = ( ReturnsZeroShell("/etc/init.d/portmap status > /dev/null 2>&1" ) )
NfsClient.redhat_s_6::
! # This is an ugly hack since portmap is rpcbind in RHEL6
#
# expose to all NfsClient heaps which chat on storagenet, use filer, etc
#
# check if portmap enabled at boot
#
! chkconfig_portmap_on = ( ReturnsZero("/sbin/chkconfig --level 3 rpcbind" ) )
#
# check if portmap is running
#
! init_portmap_running = ( ReturnsZeroShell("/etc/init.d/rpcbind status > /dev/null 2>&1" ) )
NfsClient::
#
+ # check if nfslock is running
+ #
+ init_nfslock_running = ( ReturnsZeroShell("/etc/init.d/nfslock status > /dev/null 2>&1" ) )
+
+ #
# check if autofs enabled at boot
#
chkconfig_autofs_on = ( ReturnsZero("/sbin/chkconfig --level 3 autofs" ) )
#
***************
*** 118,137 ****
#
!init_portmap_running.iface01_viable.(NfsClient)::
"/etc/init.d/portmap restart > /dev/null 2>&1"
define=init_portmap_running
#
# keep mounting nfs below bringing up $(iface01) and firing up portmap!
#
! !init_autofs_running.init_portmap_running.iface01_viable.(NfsClient)::
"/etc/init.d/autofs restart > /dev/null 2>&1"
define=init_autofs_running
!chkconfig_portmap_on.(NfsClient)::
"/sbin/chkconfig portmap on"
define=chkconfig_portmap_on
!chkconfig_autofs_on.(NfsClient)::
"/sbin/chkconfig autofs on"
define=chkconfig_autofs_on
-
- init_autofs_restart.(NfsClient)::
- "/etc/init.d/autofs restart > /dev/null 2>&1"
--- 120,142 ----
#
!init_portmap_running.iface01_viable.(NfsClient)::
"/etc/init.d/portmap restart > /dev/null 2>&1"
define=init_portmap_running
#
+ # keep starting nfslock above mounting nfs!
+ #
+ !init_nfslock_running.(NfsClient)::
+ "/etc/init.d/nfslock restart > /dev/null 2>&1"
+ define=init_nfslock_running
+ #
# keep mounting nfs below bringing up $(iface01) and firing up portmap!
#
! (!init_autofs_running|init_autofs_restart).init_portmap_running.iface01_viable.init_nfslock_running.(NfsClient)::
"/etc/init.d/autofs restart > /dev/null 2>&1"
define=init_autofs_running
!chkconfig_portmap_on.(NfsClient)::
"/sbin/chkconfig portmap on"
define=chkconfig_portmap_on
!chkconfig_autofs_on.(NfsClient)::
"/sbin/chkconfig autofs on"
define=chkconfig_autofs_on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment