From 8994d775f754a27dc319152c7a823d6e853155c4 Mon Sep 17 00:00:00 2001 From: freesource Date: Wed, 17 Oct 2001 01:44:31 +0000 Subject: [PATCH] Added /sbin and /usr/sbin in case non-root users don't have this path. --- gbootroot | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gbootroot b/gbootroot index ca1a830..deb9b0b 100755 --- a/gbootroot +++ b/gbootroot @@ -89,6 +89,16 @@ BEGIN { unshift(@INC,"/usr/share/perl5"); } + my $sbin = grep(/\/usr\/sbin/,$ENV{'PATH'}); + if ($sbin == 0) { + $ENV{'PATH'} = "/usr/sbin:" . $ENV{'PATH'}; + } + + $sbin = grep(/\/sbin/,$ENV{'PATH'}); + if ($sbin == 0) { + $ENV{'PATH'} = "/sbin:" . $ENV{'PATH'}; + } + }