blob: b06057c8d8159d0c61eb6d8e5795704397862472 (plain
# The purpose of this script is to provide a system to update the PC104 in
# autonomous mode via the network.
# It is called by the linuxrc and should not be called by hand.
# PATH is not correctly set...
# Bring eth0 up
ifconfig eth0 up
# Get the configuration of the network via dhcp
udhcpc -i eth0 -s /etc/udhcpc.script
# Wait here for a connection. I do not know if it is a feature or a bug, but
# when nc receive a connection, it is end here.
nc -l -p 1234
# Mount the real system
# Pivot root to the new_root.
# XXX It is a good idea to pivot_root ? Chroot is better ?
pivot_root . old_root
exec chroot . sh <dev/console >dev/console 2>&1
# This part sux : what's about the old process ?
# Kill them ?
# We should call all the script
# TODO : find a better way to call it.
# XXX And for the end ?
# The FS has enough errors so do it well ! Umount everything !