rcorder feature request

Stephen Welker stephen.welker at nemostar.com.au
Wed Jan 11 18:47:42 PST 2023


During boot rcorder only scans the /etc/rc.d directory.

Feature request: have rcorder scan both /etc/rc.d /etc/rc.local.d 
directories.

I my use case I have around 60 /etc/rc.local.d scripts. Keeping them 
separated ensures that when it comes time to do a clean install, say 
from an ISO, I am able to just tar the /etc/rc.local.d directory (save 
on another media, etc); rather than trying to determine which came with 
DragonFly and which didn't.

/etc/rc & /etc/rc.shutdown scripts would need to be modified and 
/etc/rc.local.d directory be created if absent during install/upgrade.


diff -u rc.old rc
--- rc.old	2023-01-12 12:21:43.657840000 +1100
+++ rc	2023-01-11 14:00:27.451076000 +1100
@@ -72,7 +72,7 @@
  	skip_firstboot="-s firstboot"
  fi

-files=`rcorder ${skip} ${skip_firstboot} /etc/rc.d/* 2>/dev/null`
+files=`rcorder ${skip} ${skip_firstboot} /etc/rc.d/* /etc/rc.local.d/* 
2>/dev/null`

  for _rc_elem in ${files}; do
  	run_rc_script ${_rc_elem} ${_boot}


diff -u rc.shutdown.old rc.shutdown
--- rc.shutdown.old	2023-01-12 12:34:31.816184000 +1100
+++ rc.shutdown	2023-01-11 14:01:06.443299000 +1100
@@ -77,7 +77,7 @@
  	_rcshutdown_watchdog=$!
  fi

-files=`rcorder -k shutdown /etc/rc.d/* 2>/dev/null`
+files=`rcorder -k shutdown /etc/rc.d/* /etc/rc.local.d/* 2>/dev/null`

  for _rc_elem in `reverse_list $files`; do
  	debug "run_rc_script $_rc_elem stop"


NB: /usr/local/etc/rc.d scripts are not subject to ordering by rcorder 
and may not be on a mounted file system at the time of rcorder execution.


-- 
regards,
Stephen Welker.


More information about the Users mailing list