--- pptp-command-20050401 2013-05-09 22:12:16.260523249 +0200 +++ pptp-command-20050401 2013-05-09 22:05:40.285029838 +0200 @@ -58,7 +58,7 @@ # # subsys_dir - the place "rc" looks to see if a servics is started # before it runs the K* scripts -my $subsys_dir = "/var/lock/subsys"; +my $subsys_dir = "/var/lock"; # # The resolv.confs... @@ -742,10 +742,10 @@ unless defined $server; #build a regexp of the currently existing interfaces - my @ifconfig = `/sbin/ifconfig`; + my @ifconfig = `/bin/ifconfig`; foreach $f (@ifconfig) { next unless $f =~ /^[a-z]/; - @foo=split ' ', $f; + @foo=split ':', $f; push @filter, $foo[0]; } my $if_re = join '|', @filter; @@ -763,10 +763,10 @@ $timeout--; @ifs = (); sleep 1; - @ifconfig=`/sbin/ifconfig`; + @ifconfig=`/bin/ifconfig`; foreach $f (@ifconfig) { next unless $f =~ /^[a-z]/; - @foo=split ' ', $f; + @foo=split ':', $f; push @ifs, $foo[0]; } ($if, undef) = grep {!/$if_re/} @ifs; @@ -774,10 +774,10 @@ } die "something screwy in your interface names: $if\n" if $if !~ /^($safe_re)$/o; $if = $1; - (grep {/inet/} `/sbin/ifconfig $if`)[0] =~ /:(\d+\.\d+\.\d+\.\d+)/; + (grep {/inet/} `/bin/ifconfig $if`)[0] =~ / (\d+\.\d+\.\d+\.\d+)/; $ip = $1; - my (undef, $gw, undef) = split ' ', (`/sbin/route -n`)[-1]; + my (undef, $gw, undef) = split ' ', (`/bin/route -n`)[-1]; die "something screwy about your gateway: $gw\n" if $gw !~ /^($safe_re)$/o; my @routes = grep {/Route/} @conf; @@ -792,7 +792,7 @@ $r = $1; $r =~ s/TUNNEL_DEV/$if/og; $r =~ s/DEF_GW/$gw/og; - die "route failed on $r" if system("/sbin/route $r"); + die "route failed on $r" if system("/bin/route $r"); #store the routes added in the lock file so they can be ripped down during stop. print "Route: $r added\n"; print LOCK "$r\n"; @@ -821,7 +821,7 @@ } $r = $1; $r =~ s/add/del/o; - system("/sbin/route $r >/dev/null 2>&1"); #many of these will fail... that's fine. + system("/bin/route $r >/dev/null 2>&1"); #many of these will fail... that's fine. } close LOCK; skip: