freebsd-dev/release/picobsd/mfs_tree/etc/rc

25 lines
462 B
Plaintext
Raw Normal View History

#!/bin/sh
stty status '^T'
trap : 2
trap : 3
HOME=/; export HOME
PATH=/sbin:/bin:/usr/sbin:/usr/bin; export PATH
dev="/dev/fd0"
trap "echo 'Reboot interrupted'; exit 1" 3
echo "Loading /etc from MFS:/fd ..."
cp -Rp /fd/* /
echo "Updating /etc from ${dev}..."
mount -o rdonly ${dev} /fd && \
{ cd /fd; cp -Rp etc root / ; cd / ; umount /fd ; }
cd /etc
#rm files to stop overwrite warning
for i in *; do
[ -f $i.gz ] && rm $i
done
gzip -d *.gz
. rc1
exit 0