diff options
-rwxr-xr-x | rc.boot | 7 | ||||
-rw-r--r-- | rc.lib | 8 |
2 files changed, 7 insertions, 8 deletions
@@ -4,7 +4,14 @@ . /etc/init/rc.conf . INITDIR/rc.lib +mnt() { + while read -r _ mnt _; do + case "$mnt" in "$1") return 0; esac + done < /proc/mounts + mnt="$1"; shift + mount "$@" "$mnt" +} PATH=/usr/bin:/usr/local/bin @@ -11,14 +11,6 @@ out() { printf '\033[1;36m-> \033[m\033[1m%s\033[m\n' "$@" ;} error() { printf '\033[1;31m!> ERROR: \033[m\033[1m%s\033[m\n' "$@" >&2 ;} welcome() { printf '\033[1;36m->\033[m\033[1m Welcome to\033[35m %s\033[m\033[1m!\n' "Carbs $(uname -sr)" ;} -mnt() { - mountpoint -q "$1" || { - dir=$1 - shift - mount "$@" "$dir" - } -} - emergency_shell() { error "Cannot continue init due to errors above, starting emergency shell" \ "When ready, type 'exit' to continue the boot." |