utils/pb-console: establish PATH before running pb-config
authorJeremy Kerr <jk@ozlabs.org>
Tue, 14 Apr 2015 06:23:36 +0000 (16:23 +1000)
committerJeremy Kerr <jk@ozlabs.org>
Tue, 14 Apr 2015 06:23:36 +0000 (16:23 +1000)
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
utils/pb-console

index 64bf77fd0c69e4e77973dc0187bb5a155df872e3..36b9c034e51af0eeaae7b54a03b5ed323798d5dc 100644 (file)
@@ -104,6 +104,13 @@ case "$(tty)" in
        ;;
 esac
 
        ;;
 esac
 
+# we may have been run from udev - ensure we have a sensible PATH
+if [ -z "$PATH" ]
+then
+       PATH=/usr/bin:/usr/sbin:/bin:/sbin
+fi
+export PATH
+
 verbose_opt=
 if $pb_config debug | grep -q enabled
 then
 verbose_opt=
 if $pb_config debug | grep -q enabled
 then