Changeset View
Changeset View
Standalone View
Standalone View
libexec/rc/rc.subr
Show First 20 Lines • Show All 2,025 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
find_local_scripts_new() { | find_local_scripts_new() { | ||||
local_rc='' | local_rc='' | ||||
for dir in ${local_startup}; do | for dir in ${local_startup}; do | ||||
if [ -d "${dir}" ]; then | if [ -d "${dir}" ]; then | ||||
for file in `grep -l '^# PROVIDE:' ${dir}/* 2>/dev/null`; do | for file in `grep -l '^# PROVIDE:' ${dir}/* 2>/dev/null`; do | ||||
case "$file" in | case "$file" in | ||||
*.sample) ;; | *.sample|*.pkgsave) ;; | ||||
*) if [ -x "$file" ]; then | *) if [ -x "$file" ]; then | ||||
local_rc="${local_rc} ${file}" | local_rc="${local_rc} ${file}" | ||||
fi | fi | ||||
;; | ;; | ||||
esac | esac | ||||
done | done | ||||
fi | fi | ||||
done | |||||
} | |||||
find_system_scripts() { | |||||
system_rc='' | |||||
for file in /etc/rc.d/*; do | |||||
case "$file" in | |||||
freebsd_igalic.co: this only works after adding changing it to: | |||||
andrew_tao173.riddles.org.ukUnsubmitted Done Inline Actionscase "${file##*/}" in to avoid the superfluous fork andrew_tao173.riddles.org.uk: ```
case "${file##*/}" in
```
to avoid the superfluous fork | |||||
*.*) ;; | |||||
*) if [ -x "$file" ]; then | |||||
system_rc="${system_rc} ${file}" | |||||
fi | |||||
;; | |||||
esac | |||||
done | done | ||||
} | } | ||||
# check_required_{before|after} command | # check_required_{before|after} command | ||||
# Check for things required by the command before and after its precmd, | # Check for things required by the command before and after its precmd, | ||||
# respectively. The two separate functions are needed because some | # respectively. The two separate functions are needed because some | ||||
# conditions should prevent precmd from being run while other things | # conditions should prevent precmd from being run while other things | ||||
# depend on precmd having already been run. | # depend on precmd having already been run. | ||||
▲ Show 20 Lines • Show All 143 Lines • Show Last 20 Lines |
this only works after adding changing it to: