Hali!
Azt szeretnem megoldani, hogy a dhcp kliens hatterben induljon el a /etc/init.d/networking initscript hatasara. Gyors guglizassal nem talaltam sok mindent, ezert kerdezem itt.
/etc/network/interfaces fajlom viszonylag standard formatumu:
auto eth1
iface eth1 inet dhcp
wpa-conf /etc/wpa_supplicant.conf
Elore is thx a remelhetoleg gyors segitsegert :D
- 800 megtekintés
Hozzászólások
Valahogy igy:
/etc/init.d/networking-wan:
#! /bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
[ -x /sbin/ifup ] || exit 0
function getopt () {
optname="$1"
opt="$(grep "^$optname=" /etc/network/options)"
if [ -n "$opt" ]; then
eval $opt
fi
}
case "$1" in
start|force-reload|restart)
getopt wan_if
if [ -n "$wan_if" ]; then
echo "Configuring WAN interface in the background..."
(
while true; do
status="$(ifup "$wan_if" 2>&1)"
if [ -z "$(echo "$status" | grep -s "Failed to bring up $wan_if.")" ]; then
break
fi
done
) &
fi
;;
stop)
;;
*)
echo "Usage: ${0##*/} {start|stop|restart|force-reload}"
exit 1
;;
esac
exit 0
/etc/network/interfaces
-be, az interface spec. vegere:
up run-parts --arg=start /etc/rc-wan.d || true
down run-parts --arg=stop /etc/rc-wan.d || true
/etc/network/options
vegere (vagy ahova jolesik, csak modositani kell az
/etc/init.d/networking-wan
-t, hogy megtalalja):
wan_if=eth1
Letrehozol egy
/etc/rc-wan.d
nevu konyvtarat, es letrehozol benne symlinkeket (az /etc/rc?.d stilusaban) azokhoz a szolgaltatasokhoz, amiknek csak akkor kell indulni, amikor megjelenik a WAN interfesz (pl. ntpdate, ntp, openvpn, stb.). Ugyanakkor a normalis runlevelekbol (rc2.d) kiveszed ugyanezeket, hogy ott ne induljanak el.
Csinalsz egy symlinket az
/etc/init.d/networking-wan
-ra:
update-rc.d networking-wan start 55 S .
Nagyjabol ennyi, remelem, meg idoben erkezett a segitseg :-)
- A hozzászóláshoz be kell jelentkezni
Ennel azert egyszerubb, ha ezt irod az interfaces-be:
allow-hotplug eth1
iface eth1 inet manual
wpa-driver wext
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
- A hozzászóláshoz be kell jelentkezni
Aham! Ez lesz az szerintem, amit kerestem. allow-hotplug... hmmm, minnyar ki is probalom :-)
- A hozzászóláshoz be kell jelentkezni
Na, megoldottam magamnak a problemat: http://hup.hu/node/47776
- A hozzászóláshoz be kell jelentkezni