Proberly use UID check and escape $0 v0.9.20
authorMichael Prokop <mika@grml.org>
Tue, 24 Nov 2009 23:50:05 +0000 (00:50 +0100)
committerMichael Prokop <mika@grml.org>
Tue, 24 Nov 2009 23:50:05 +0000 (00:50 +0100)
debian/changelog
grml2usb
grml2usb-compat
tarball.sh

index 1d5175f..df493c8 100644 (file)
@@ -1,3 +1,10 @@
+grml2usb (0.9.20) unstable; urgency=low
+
+  * tarball.sh: do not use $UID but use $(id -u) instead so it proberly
+    works with dash and make sure to escape "$0". Thanks to Stefan Weiss!
+
+ -- Michael Prokop <mika@grml.org>  Wed, 25 Nov 2009 00:47:36 +0100
+
 grml2usb (0.9.19) unstable; urgency=low
 
   [ Ulrich Dangel ]
index c09f2a1..0ada392 100755 (executable)
--- a/grml2usb
+++ b/grml2usb
@@ -20,7 +20,7 @@ import fileinput
 import glob
 
 # global variables
-PROG_VERSION = "0.9.19"
+PROG_VERSION = "0.9.20"
 MOUNTED = set()  # register mountpoints
 TMPFILES = set() # register tmpfiles
 DATESTAMP = time.mktime(datetime.datetime.now().timetuple()) # unique identifier for syslinux.cfg
index fd3cb69..a31c008 100755 (executable)
@@ -18,7 +18,7 @@ from inspect import isroutine, isclass
 import datetime, logging, os, re, subprocess, sys, tempfile, time, os.path
 
 # global variables
-PROG_VERSION = "0.9.19"
+PROG_VERSION = "0.9.20"
 MOUNTED = set()  # register mountpoints
 TMPFILES = set() # register tmpfiles
 DATESTAMP = time.mktime(datetime.datetime.now().timetuple()) # unique identifier for syslinux.cfg
index d5f850e..895d3ed 100755 (executable)
@@ -43,8 +43,8 @@ cat > "${DIR}"/install.sh << EOF
 
 set -e
 
-if [ "\$UID" != 0 ] ; then
-   echo "Error: become root before starting $0" >& 2
+if [ \$(id -u) != 0 ] ; then
+   echo "Error: become root before starting \$0" >& 2
    exit 1
 fi
 
@@ -93,8 +93,8 @@ cat > "${DIR}"/uninstall.sh << EOF
 
 set -e
 
-if [ "\$UID" != 0 ] ; then
-   echo "Error: become root before starting $0" >& 2
+if [ \$(id -u) != 0 ] ; then
+   echo "Error: become root before starting \$0" >& 2
    exit 1
 fi