Commit 8f6d9ce7 authored by Leigh B. Stoller's avatar Leigh B. Stoller

Oops, used backtick to run egrep, when I should have used system()

instead (so the exit status could be checked in the if condition!).
parent a9ab2bdb
...@@ -48,6 +48,9 @@ my $installdir = "/"; ...@@ -48,6 +48,9 @@ my $installdir = "/";
my $jailmode = 0; my $jailmode = 0;
my $jailfile = ""; my $jailfile = "";
# Protos
sub GetTarFile($$);
# #
# Must be running as root to work. # Must be running as root to work.
# #
...@@ -101,7 +104,7 @@ if (! -d $installdir) { ...@@ -101,7 +104,7 @@ if (! -d $installdir) {
# the file now. If the tar fails, we got big problems. # the file now. If the tar fails, we got big problems.
# #
if (-e $IDENTFILE) { if (-e $IDENTFILE) {
if (! `egrep -q -s '^${tarfile}' $IDENTFILE`) { if (! system("egrep -q -s '^${tarfile}' $IDENTFILE")) {
print STDOUT "Tarfile $tarfile has already been installed!\n"; print STDOUT "Tarfile $tarfile has already been installed!\n";
exit(1); exit(1);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment