Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144566526
D27959.1775489331.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D27959.1775489331.diff
View Options
diff --git a/libexec/rc/rc b/libexec/rc/rc
--- a/libexec/rc/rc
+++ b/libexec/rc/rc
@@ -94,7 +94,9 @@
# Do a first pass to get everything up to $early_late_divider so that
# we can do a second pass that includes $local_startup directories
#
-files=`rcorder ${skip} ${skip_firstboot} /etc/rc.d/* 2>/dev/null`
+unset system_rc
+find_system_scripts
+files=`rcorder ${skip} ${skip_firstboot} ${system_rc} 2>/dev/null`
_rc_elem_done=' '
for _rc_elem in ${files}; do
@@ -106,7 +108,7 @@
esac
done
-unset files local_rc
+unset files local_rc system_rc
# Now that disks are mounted, for each dir in $local_startup
# search for init scripts that use the new rc.d semantics.
@@ -122,7 +124,8 @@
skip_firstboot=""
fi
-files=`rcorder ${skip} ${skip_firstboot} /etc/rc.d/* ${local_rc} 2>/dev/null`
+find_system_scripts
+files=`rcorder ${skip} ${skip_firstboot} ${system_rc} ${local_rc} 2>/dev/null`
for _rc_elem in ${files}; do
case "$_rc_elem_done" in
*" $_rc_elem "*) continue ;;
diff --git a/libexec/rc/rc.subr b/libexec/rc/rc.subr
--- a/libexec/rc/rc.subr
+++ b/libexec/rc/rc.subr
@@ -1401,7 +1401,7 @@
/etc/rc.d/*.sh) # no longer allowed in the base
warn "Ignoring old-style startup script $_file"
;;
- *[~#]|*.OLD|*.bak|*.orig|*,v) # scratch file; skip
+ *[~#]|*.OLD|*.bak|*.orig|*,v|*.pkgsave|*.pkgnew) # scratch file; skip
warn "Ignoring scratch file $_file"
;;
*) # run in subshell
@@ -2042,6 +2042,19 @@
done
}
+find_system_scripts() {
+ system_rc=''
+ for file in /etc/rc.d/*; do
+ case "${file##*/}" in
+ *.pkgsave) ;;
+ *) if [ -x "$file" ]; then
+ system_rc="${system_rc} ${file}"
+ fi
+ ;;
+ esac
+ done
+}
+
# check_required_{before|after} command
# Check for things required by the command before and after its precmd,
# respectively. The two separate functions are needed because some
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Apr 6, 3:28 PM (1 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28278366
Default Alt Text
D27959.1775489331.diff (1 KB)
Attached To
Mode
D27959: kldxref: skip .pkgsave files
Attached
Detach File
Event Timeline
Log In to Comment