X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=etc%2Finit.d%2Fgrml-reboot;h=35a4fb9afe51e6c50a829bf0c9554f3a79c70128;hb=refs%2Ftags%2Fv1.3.0;hp=637630bab5f978ad4e0c35dc54407e8cda405616;hpb=4f347c30acec4633e590a7c0c36c60f0b89c68cc;p=grml-etc.git diff --git a/etc/init.d/grml-reboot b/etc/init.d/grml-reboot index 637630b..35a4fb9 100755 --- a/etc/init.d/grml-reboot +++ b/etc/init.d/grml-reboot @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Filename: grml-reboot # Purpose: reboot grml system # Authors: grml-team (grml.org) @@ -14,7 +14,8 @@ export PATH=/sbin:/bin:/usr/bin:/usr/sbin cd / # Clean input/output -exec >/dev/console 2>&1 "$CONSOLE" 2>&1 <"$CONSOLE" # default variables INSTALLED=false @@ -48,7 +49,7 @@ if ! $INSTALLED ; then DEVICE="" if [ -n "$CDROM" ] ; then DEVICE="${CDROM##/dev/}" - DEVICE="${DEVICE%%[0-9]*}" + [ -d /sys/block/${DEVICE} ] || DEVICE="${DEVICE%%[0-9]*}" if [ -n "$DEVICE" ] ; then # is it a removable device? @@ -78,8 +79,8 @@ case "$0" in esac mysleep() { - for i in $(seq 1 40) ; do - usleep 75000 + for i in $(seq 1 30) ; do + sleep 1 echo -n "$1.${NORMAL}" done echo ""