projects
/
grml-etc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
986780d
)
Only remove digits from DEVICE in grml-reboot if DEVICE is not already a
author
Ulrich Dangel
<uli@spamt.net>
Sun, 25 Oct 2009 14:24:29 +0000
(15:24 +0100)
committer
Ulrich Dangel
<uli@spamt.net>
Mon, 26 Oct 2009 09:40:01 +0000
(10:40 +0100)
valid block device name.
etc/init.d/grml-reboot
patch
|
blob
|
history
diff --git
a/etc/init.d/grml-reboot
b/etc/init.d/grml-reboot
index
7f14558
..
81ab23a
100755
(executable)
--- a/
etc/init.d/grml-reboot
+++ b/
etc/init.d/grml-reboot
@@
-49,7
+49,7
@@
if ! $INSTALLED ; then
DEVICE=""
if [ -n "$CDROM" ] ; then
DEVICE="${CDROM##/dev/}"
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?
if [ -n "$DEVICE" ] ; then
# is it a removable device?