/etc/init.d/grml-reboot: use bash as interpreter v1.1.25
authorMichael Prokop <mika@grml.org>
Mon, 19 Oct 2009 07:39:10 +0000 (09:39 +0200)
committerMichael Prokop <mika@grml.org>
Mon, 19 Oct 2009 07:39:10 +0000 (09:39 +0200)
debian/changelog
etc/init.d/grml-reboot

index 61617d2..52cfd63 100644 (file)
@@ -1,3 +1,11 @@
+grml-etc (1.1.25) unstable; urgency=low
+
+  * /etc/init.d/grml-reboot: use bash as interpreter so the
+    syntax of the read command is supported. Thanks to Christian
+    Hofstaedtler for the bugreport.
+
+ -- Michael Prokop <mika@grml.org>  Mon, 19 Oct 2009 09:38:22 +0200
+
 grml-etc (1.1.24) unstable; urgency=low
 
   * .xinitrc: fix syntax of test for $XKEYBOARD.
index 637630b..7f14558 100755 (executable)
@@ -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 </dev/console
+CONSOLE=/dev/console
+[ -c "$CONSOLE" ] && exec >"$CONSOLE" 2>&1 <"$CONSOLE"
 
 # default variables
 INSTALLED=false