Lines 58-64
Link Here
|
58 |
# |
58 |
# |
59 |
# subsys_dir - the place "rc" looks to see if a servics is started |
59 |
# subsys_dir - the place "rc" looks to see if a servics is started |
60 |
# before it runs the K* scripts |
60 |
# before it runs the K* scripts |
61 |
my $subsys_dir = "/var/lock/subsys"; |
61 |
my $subsys_dir = "/var/lock"; |
62 |
|
62 |
|
63 |
# |
63 |
# |
64 |
# The resolv.confs... |
64 |
# The resolv.confs... |
Lines 742-751
Link Here
|
742 |
unless defined $server; |
742 |
unless defined $server; |
743 |
|
743 |
|
744 |
#build a regexp of the currently existing interfaces |
744 |
#build a regexp of the currently existing interfaces |
745 |
my @ifconfig = `/sbin/ifconfig`; |
745 |
my @ifconfig = `/bin/ifconfig`; |
746 |
foreach $f (@ifconfig) { |
746 |
foreach $f (@ifconfig) { |
747 |
next unless $f =~ /^[a-z]/; |
747 |
next unless $f =~ /^[a-z]/; |
748 |
@foo=split ' ', $f; |
748 |
@foo=split ':', $f; |
749 |
push @filter, $foo[0]; |
749 |
push @filter, $foo[0]; |
750 |
} |
750 |
} |
751 |
my $if_re = join '|', @filter; |
751 |
my $if_re = join '|', @filter; |
Lines 763-772
Link Here
|
763 |
$timeout--; |
763 |
$timeout--; |
764 |
@ifs = (); |
764 |
@ifs = (); |
765 |
sleep 1; |
765 |
sleep 1; |
766 |
@ifconfig=`/sbin/ifconfig`; |
766 |
@ifconfig=`/bin/ifconfig`; |
767 |
foreach $f (@ifconfig) { |
767 |
foreach $f (@ifconfig) { |
768 |
next unless $f =~ /^[a-z]/; |
768 |
next unless $f =~ /^[a-z]/; |
769 |
@foo=split ' ', $f; |
769 |
@foo=split ':', $f; |
770 |
push @ifs, $foo[0]; |
770 |
push @ifs, $foo[0]; |
771 |
} |
771 |
} |
772 |
($if, undef) = grep {!/$if_re/} @ifs; |
772 |
($if, undef) = grep {!/$if_re/} @ifs; |
Lines 774-783
Link Here
|
774 |
} |
774 |
} |
775 |
die "something screwy in your interface names: $if\n" if $if !~ /^($safe_re)$/o; |
775 |
die "something screwy in your interface names: $if\n" if $if !~ /^($safe_re)$/o; |
776 |
$if = $1; |
776 |
$if = $1; |
777 |
(grep {/inet/} `/sbin/ifconfig $if`)[0] =~ /:(\d+\.\d+\.\d+\.\d+)/; |
777 |
(grep {/inet/} `/bin/ifconfig $if`)[0] =~ / (\d+\.\d+\.\d+\.\d+)/; |
778 |
$ip = $1; |
778 |
$ip = $1; |
779 |
|
779 |
|
780 |
my (undef, $gw, undef) = split ' ', (`/sbin/route -n`)[-1]; |
780 |
my (undef, $gw, undef) = split ' ', (`/bin/route -n`)[-1]; |
781 |
die "something screwy about your gateway: $gw\n" if $gw !~ /^($safe_re)$/o; |
781 |
die "something screwy about your gateway: $gw\n" if $gw !~ /^($safe_re)$/o; |
782 |
|
782 |
|
783 |
my @routes = grep {/Route/} @conf; |
783 |
my @routes = grep {/Route/} @conf; |
Lines 792-798
Link Here
|
792 |
$r = $1; |
792 |
$r = $1; |
793 |
$r =~ s/TUNNEL_DEV/$if/og; |
793 |
$r =~ s/TUNNEL_DEV/$if/og; |
794 |
$r =~ s/DEF_GW/$gw/og; |
794 |
$r =~ s/DEF_GW/$gw/og; |
795 |
die "route failed on $r" if system("/sbin/route $r"); |
795 |
die "route failed on $r" if system("/bin/route $r"); |
796 |
#store the routes added in the lock file so they can be ripped down during stop. |
796 |
#store the routes added in the lock file so they can be ripped down during stop. |
797 |
print "Route: $r added\n"; |
797 |
print "Route: $r added\n"; |
798 |
print LOCK "$r\n"; |
798 |
print LOCK "$r\n"; |
Lines 821-827
Link Here
|
821 |
} |
821 |
} |
822 |
$r = $1; |
822 |
$r = $1; |
823 |
$r =~ s/add/del/o; |
823 |
$r =~ s/add/del/o; |
824 |
system("/sbin/route $r >/dev/null 2>&1"); #many of these will fail... that's fine. |
824 |
system("/bin/route $r >/dev/null 2>&1"); #many of these will fail... that's fine. |
825 |
} |
825 |
} |
826 |
close LOCK; |
826 |
close LOCK; |
827 |
skip: |
827 |
skip: |