Browse Source

rc.trymount: added -v mode, reminding the user to mount /rootfs if $root is not set

0.2-maint
Alejandro Mery 15 years ago
parent
commit
af324104b5
1 changed files with 11 additions and 0 deletions
  1. +11
    -0
      initramfs/etc_rc.d_rc.trymount.sh

+ 11
- 0
initramfs/etc_rc.d_rc.trymount.sh

@ -15,6 +15,12 @@
. /etc/conf/idunn
if [ "x$1" = "x-v" ]; then
verbose=yes
else
verbose=
fi
if grep -q "^[^ ]* $rootfs " /proc/mounts; then
# alredy mounted
error=0
@ -35,6 +41,11 @@ elif [ -n "$root" ]; then
status
else
[ -z "$verbose" ] ||
cat <<-EOT >&2
sorry, root device not specified.
mount it at $rootfs and try again
EOT
error=1
fi
exit ${error:-0}

Loading…
Cancel
Save