161120Sluigi#!/bin/sh 2107026Sluigi# $FreeBSD: releng/11.0/release/picobsd/mfs_tree/etc/rc 190761 2009-04-06 11:14:30Z luigi $ 361120Sluigi 461120Sluigistty status '^T' 561120Sluigitrap : 2 661120Sluigitrap : 3 761120Sluigi 861120SluigiHOME=/; export HOME 991876SluigiPATH=/bin; export PATH 1092022Sluigidev=`sysctl -n machdep.guessed_bootdev` 1192022Sluigi[ -c "${dev}" ] || dev="/dev/fd0" 1261120Sluigi 1361120Sluigitrap "echo 'Reboot interrupted'; exit 1" 3 14107026Sluigiset `df /`; mount -u $8 / # upgrade mount to rw 1591853Sluigiecho "Loading /etc from MFS:/fd ..." 1691853Sluigicp -Rp /fd/* / 1791853Sluigiecho "Updating /etc from ${dev}..." 1891853Sluigimount -o rdonly ${dev} /fd && \ 1991853Sluigi{ cd /fd; cp -Rp etc root / ; cd / ; umount /fd ; } 2061120Sluigicd /etc 2162486Sroger#rm files to stop overwrite warning 2275900Sjoefor i in *; do 2391853Sluigi [ -f $i.gz ] && rm $i 2475900Sjoedone 2561120Sluigigzip -d *.gz 26190761Sluigi. /etc/rc1 2761120Sluigiexit 0 28