Merge pull request #399 from phreaker0/path2

don't use hardcoded paths
This commit is contained in:
Jim Salter 2020-11-01 17:28:20 -05:00 committed by GitHub
commit 6041f0982b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 3 deletions

9
sanoid
View File

@ -35,10 +35,13 @@ if (keys %args < 2) {
$args{'verbose'} = 1;
}
my $pscmd = '/bin/ps';
# for compatibility reasons, older versions used hardcoded command paths
$ENV{'PATH'} = $ENV{'PATH'} . ":/bin:/sbin";
my $zfs = '/sbin/zfs';
my $zpool = '/sbin/zpool';
my $pscmd = 'ps';
my $zfs = 'zfs';
my $zpool = 'zpool';
my $conf_file = "$args{'configdir'}/sanoid.conf";
my $default_conf_file = "$args{'configdir'}/sanoid.defaults.conf";