automatic commit - 30-12-2022

This commit is contained in:
firebee
2022-12-30 03:00:01 +01:00
parent 279c93d774
commit 7ca599adc9
13 changed files with 49 additions and 217 deletions

View File

@@ -1,3 +1,4 @@
#DHCP
echo Starting DHCP client
exec /c/mint/sys/net/dhclient.ttp -q -nw -lf /c/mint/sys/dhcp/lease -pf /c/mint/sys/dhcp/pid -sf /c/mint/sys/dhcp/script
#DHCP
echo Starting DHCP client
exec u:/sbin/dhclient -q -nw -lf /c/mint/sys/dhcp/lease -pf /c/mint/sys/dhcp/pid -sf /c/mint/sys/dhcp/script

Binary file not shown.

Binary file not shown.

View File

@@ -3,7 +3,7 @@
sln c:\mint\sys\etc u:\etc
sln c:\mint\sys\bin u:\bin
sln c:\mint\sys\sbin u:\sbin
sln c:\mint\sys\net u:\net
#sln c:\mint\sys\net u:\net
sln c:\mint\sys\tmp u:\tmp
sln c:\mint\sys\var u:\var
sln c:\home u:\home

View File

@@ -1,20 +1,20 @@
#!/c/mint/sys/bin/sh
#!/bin/bash
#if [ -x /usr/bin/logger ]; then
# LOGGER="/usr/bin/logger -s -p user.notice -t dhclient"
#else
LOGGER=/c/mint/sys/bin/echo.ttp
LOGGER=/bin/echo
#fi
make_resolv_conf() {
if [ "x$new_domain_name" != x ] || [ x"$new_domain_name_servers" != x ]; then
>/etc/resolv.conf
if [ "x$new_domain_name" != x ]; then
/c/mint/sys/bin/echo.ttp search $new_domain_name >/etc/resolv.conf
$LOGGER search $new_domain_name >/etc/resolv.conf
fi
if [ "x$new_domain_name_servers" != x ]; then
for nameserver in $new_domain_name_servers; do
/c/mint/sys/bin/echo.ttp nameserver $nameserver >>/etc/resolv.conf
$LOGGER nameserver $nameserver >>/etc/resolv.conf
done
fi
fi
@@ -63,18 +63,18 @@ if [ x$alias_subnet_mask != x ]; then
fi
if [ x$reason = xMEDIUM ]; then
eval "/c/mint/sys/net/ifconfig.ttp $interface $medium"
eval "/c/mint/sys/net/ifconfig.ttp $interface addr -alias 0.0.0.0 $medium" >/dev/null 2>&1
eval "/bin/ifconfig $interface $medium"
eval "/bin/ifconfig $interface addr -alias 0.0.0.0 $medium" >/dev/null 2>&1
sleep 1
exit_with_hooks 0
fi
if [ x$reason = xPREINIT ]; then
if [ x$alias_ip_address != x ]; then
/c/mint/sys/net/ifconfig.ttp $interface addr -alias $alias_ip_address > /dev/null 2>&1
/c/mint/sys/net/route.ttp delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1
/bin/ifconfig $interface addr -alias $alias_ip_address > /dev/null 2>&1
/bin/route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1
fi
/c/mint/sys/net/ifconfig.ttp $interface addr 0.0.0.0 netmask 0.0.0.0 \
/bin/ifconfig $interface addr 0.0.0.0 netmask 0.0.0.0 \
broadaddr 255.255.255.255 up
exit_with_hooks 0
fi
@@ -131,20 +131,20 @@ if [ x$reason = xBOUND ] || [ x$reason = xRENEW ] || \
# fi
if [ x$old_ip_address != x ] && [ x$alias_ip_address != x ] && \
[ x$alias_ip_address != x$old_ip_address ]; then
/c/mint/sys/net/ifconfig.ttp $interface addr -alias $alias_ip_address > /dev/null 2>&1
/c/mint/sys/net/route.ttp delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1
/bin/ifconfig $interface addr -alias $alias_ip_address > /dev/null 2>&1
/bin/route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1
fi
if [ x$old_ip_address != x ] && [ x$old_ip_address != x$new_ip_address ]
then
eval "/c/mint/sys/net/ifconfig.ttp $interface addr -alias $old_ip_address $medium"
/c/mint/sys/net/route.ttp delete $old_ip_address 127.1 >/dev/null 2>&1
eval "/bin/ifconfig $interface addr -alias $old_ip_address $medium"
/bin/route delete $old_ip_address 127.1 >/dev/null 2>&1
for router in $old_routers; do
/c/mint/sys/net/route.ttp delete default $router >/dev/null 2>&1
/bin/route delete default $router >/dev/null 2>&1
done
if [ "$old_static_routes" != "" ]; then
set -- $old_static_routes
while [ $# -gt 1 ]; do
/c/mint/sys/net/route.ttp delete $1 $2
/bin/route delete $1 $2
shift; shift
done
fi
@@ -152,7 +152,7 @@ if [ x$reason = xBOUND ] || [ x$reason = xRENEW ] || \
fi
if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
[ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
eval "/c/mint/sys/net/ifconfig.ttp $interface addr $new_ip_address $new_netmask_arg \
eval "/bin/ifconfig $interface addr $new_ip_address $new_netmask_arg \
$new_broadcast_arg $medium"
$LOGGER "New IP Address($interface): $new_ip_address"
$LOGGER "New Subnet Mask($interface): $new_subnet_mask"
@@ -160,23 +160,23 @@ if [ x$reason = xBOUND ] || [ x$reason = xRENEW ] || \
if [ "$new_routers" != "" ]; then
$LOGGER "New Routers: $new_routers"
fi
/c/mint/sys/net/route.ttp add $new_ip_address 127.1 >/dev/null 2>&1
/bin/route add $new_ip_address 127.1 >/dev/null 2>&1
for router in $new_routers; do
/c/mint/sys/net/route.ttp add default $interface gw $router >/dev/null 2>&1
/bin/route add default $interface gw $router >/dev/null 2>&1
done
if [ "$new_static_routes" != "" ]; then
$LOGGER "New Static Routes: $new_static_routes"
set -- $new_static_routes
while [ $# -gt 1 ]; do
/c/mint/sys/net/route.ttp add $1 $2
/bin/route add $1 $2
shift; shift
done
fi
fi
if [ x$new_ip_address != x$alias_ip_address ] && [ x$alias_ip_address != x ];
then
/c/mint/sys/net/ifconfig.ttp $interface addr alias $alias_ip_address $alias_subnet_arg
/c/mint/sys/net/route.ttp add $alias_ip_address 127.0.0.1
/bin/ifconfig $interface addr alias $alias_ip_address $alias_subnet_arg
/bin/route add $alias_ip_address 127.0.0.1
fi
make_resolv_conf
exit_with_hooks 0
@@ -185,19 +185,19 @@ fi
if [ x$reason = xEXPIRE ] || [ x$reason = xFAIL ] || [ x$reason = xRELEASE ] \
|| [ x$reason = xSTOP ]; then
if [ x$alias_ip_address != x ]; then
/c/mint/sys/net/ifconfig.ttp $interface addr -alias $alias_ip_address > /dev/null 2>&1
/c/mint/sys/net/route.ttp delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1
/bin/ifconfig $interface addr -alias $alias_ip_address > /dev/null 2>&1
/bin/route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1
fi
if [ x$old_ip_address != x ]; then
eval "/c/mint/sys/net/ifconfig.ttp $interface addr -alias $old_ip_address $medium"
/c/mint/sys/net/route.ttp delete $old_ip_address 127.1 >/dev/null 2>&1
eval "/bin/ifconfig $interface addr -alias $old_ip_address $medium"
/bin/route delete $old_ip_address 127.1 >/dev/null 2>&1
for router in $old_routers; do
/c/mint/sys/net/route.ttp delete default $router >/dev/null 2>&1
/bin/route delete default $router >/dev/null 2>&1
done
if [ "$old_static_routes" != "" ]; then
set -- $old_static_routes
while [ $# -gt 1 ]; do
/c/mint/sys/net/route.ttp delete $1 $2
/bin/route delete $1 $2
shift; shift
done
fi
@@ -205,18 +205,18 @@ if [ x$reason = xEXPIRE ] || [ x$reason = xFAIL ] || [ x$reason = xRELEASE ] \
|sh >/dev/null 2>&1
fi
if [ x$alias_ip_address != x ]; then
/c/mint/sys/net/ifconfig.ttp $interface addr alias $alias_ip_address $alias_subnet_arg
/c/mint/sys/net/route.ttp add $alias_ip_address 127.0.0.1
/bin/ifconfig $interface addr alias $alias_ip_address $alias_subnet_arg
/bin/route add $alias_ip_address 127.0.0.1
fi
exit_with_hooks 0
fi
if [ x$reason = xTIMEOUT ]; then
if [ x$alias_ip_address != x ]; then
/c/mint/sys/net/ifconfig.ttp $interface addr -alias $alias_ip_address > /dev/null 2>&1
/c/mint/sys/net/route.ttp delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1
/bin/ifconfig $interface addr -alias $alias_ip_address > /dev/null 2>&1
/bin/route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1
fi
eval "/c/mint/sys/net/ifconfig.ttp $interface addr $new_ip_address $new_netmask_arg \
eval "/bin/ifconfig $interface addr $new_ip_address $new_netmask_arg \
$new_broadcast_arg $medium"
$LOGGER "New IP Address($interface): $new_ip_address"
$LOGGER "New Subnet Mask($interface): $new_subnet_mask"
@@ -228,30 +228,30 @@ if [ x$reason = xTIMEOUT ]; then
if ping -q -c 1 $1; then
if [ x$new_ip_address != x$alias_ip_address ] && \
[ x$alias_ip_address != x ]; then
/c/mint/sys/net/ifconfig.ttp $interface addr alias $alias_ip_address $alias_subnet_arg
/c/mint/sys/net/route.ttp add $alias_ip_address 127.0.0.1
/bin/ifconfig $interface addr alias $alias_ip_address $alias_subnet_arg
/bin/route add $alias_ip_address 127.0.0.1
fi
/c/mint/sys/net/route.ttp add $new_ip_address 127.1 >/dev/null 2>&1
/bin/route add $new_ip_address 127.1 >/dev/null 2>&1
for router in $new_routers; do
/c/mint/sys/net/route.ttp add default $interface gw $router >/dev/null 2>&1
/bin/route add default $interface gw $router >/dev/null 2>&1
done
set -- $new_static_routes
while [ $# -gt 1 ]; do
/c/mint/sys/net/route.ttp add $1 $2
/bin/route add $1 $2
shift; shift
done
make_resolv_conf
exit_with_hooks 0
fi
fi
eval "/c/mint/sys/net/ifconfig.ttp $interface addr -alias $new_ip_address $medium"
eval "/bin/ifconfig $interface addr -alias $new_ip_address $medium"
for router in $old_routers; do
/c/mint/sys/net/route.ttp delete default $router >/dev/null 2>&1
/bin/route delete default $router >/dev/null 2>&1
done
if [ "$old_static_routes" != "" ]; then
set -- $old_static_routes
while [ $# -gt 1 ]; do
/c/mint/sys/net/route.ttp delete $1 $2
/bin/route delete $1 $2
shift; shift
done
fi

Binary file not shown.

View File

@@ -1,13 +1,7 @@
dhclient.ttp, echo.ttp, sh.ttp downloaded from
dhclient, echo, sh.ttp downloaded from
http://sparemint.org/sparemint/html/packages.html
route.ttp and ifconfig.ttp is a part of the FreeMiNT
tools package. Please see...
route and ifconfig is a part of the FreeMiNT
tools package.
http://wiki.sparemint.org/index.php/CVS
...for a description on how to access the FreeMiNT CVS.
Jo Even Skarstein
April, 2012

BIN
mint/sys/sbin/dhclient Normal file

Binary file not shown.