grml2iso: make sure we have the sbin directories in our PATH
authorMichael Prokop <mika@grml.org>
Wed, 26 Jun 2013 15:21:39 +0000 (17:21 +0200)
committerMichael Prokop <mika@grml.org>
Wed, 26 Jun 2013 15:26:41 +0000 (17:26 +0200)
Under Debian/wheezy it fails out-of-the-box under sudo:

| sudo /usr/sbin/grml2iso -c ./source/templates -o grml64-sipwise-release_20130626.iso grml64-full_2013.02.iso
| Error: Could not find grml2usb executable. Is /usr/sbin missing in PATH?

because of:

| ENV_SUPATH      PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
| ENV_PATH        PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

in /etc/login.defs.

grml2iso

index 632806a..a3bab29 100755 (executable)
--- a/grml2iso
+++ b/grml2iso
@@ -7,6 +7,9 @@
 # License:       This file is licensed under the GPL v2 or any later version.
 ################################################################################
 
+# make sure we have the sbin directories in our PATH to find grml2usb ootb
+PATH="${PATH}:/sbin:/usr/local/sbin:/usr/sbin"
+
 # define function getfilesize before "set -e" {{{
   if stat --help >/dev/null 2>&1; then
     getfilesize='stat -c %s'        # GNU stat