diff options
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/functions.sh | 11 | ||||
-rwxr-xr-x | sbin/rc | 10 |
2 files changed, 14 insertions, 7 deletions
diff --git a/sbin/functions.sh b/sbin/functions.sh index 34e00ad..7af6843 100644 --- a/sbin/functions.sh +++ b/sbin/functions.sh @@ -502,6 +502,17 @@ is_net_fs() { return $? } +# bool is_net_fs(path) +# +# return 0 if path is under unionfs control +# +# EXAMPLE: if is_union_fs / ; then ... +# +is_union_fs() { + [[ ! -x /sbin/unionctl ]] && return 1 + unionctl "$1" --list &>/dev/null +} + # bool is_uml_sys() # # return 0 if the currently running system is User Mode Linux @@ -410,14 +410,10 @@ if [[ ${SOFTLEVEL} == "reboot" || ${SOFTLEVEL} == "shutdown" ]] ; then rm -rf $(ls -d1 "${svcdir}/"* 2>/dev/null | \ grep -ve '\(depcache\|deptree\|envcache\)') - source /etc/init.d/halt.sh + # Call halt.sh with LC_ALL=C so that bash doesn't load any locales + # which could interfere with unmounting /usr + LC_ALL=C exec /etc/init.d/halt.sh "${SOFTLEVEL}" - if [[ ${SOFTLEVEL} == "reboot" ]] ; then - source /etc/init.d/reboot.sh - else - source /etc/init.d/shutdown.sh - fi - # Should never get here exit 0 fi |