1#!/bin/sh
| 1#!/bin/sh
|
2# $FreeBSD: head/release/picobsd/mfs_tree/etc/rc 78542 2001-06-21 08:53:21Z luigi $ 3### Special setup for one floppy PICOBSD ### 4# WARNING !!! We overwrite this file during execution with a new rc file. 5# Awful things happen if this file's size is > 1024B
| |
6 7stty status '^T' 8trap : 2 9trap : 3 10 11HOME=/; export HOME
| 2 3stty status '^T' 4trap : 2 5trap : 3 6 7HOME=/; export HOME
|
12PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin 13export PATH
| 8PATH=/sbin:/bin:/usr/sbin:/usr/bin; export PATH
|
14dev="/dev/fd0"
| 9dev="/dev/fd0"
|
15cp -p /etc/rc /etc/rc.master
| |
16 17trap "echo 'Reboot interrupted'; exit 1" 3
| 10 11trap "echo 'Reboot interrupted'; exit 1" 3
|
18echo "Reading from MFS ..." 19cd /fd; cp -Rp etc root / ; cd / 20ls /dev 21echo "Reading /etc from ${dev}..." 22mount -o rdonly ${dev} /fd 23cd /fd; cp -Rp etc root / ; cd / ; umount /fd
| 12echo "Loading /etc from MFS:/fd ..." 13cp -Rp /fd/* / 14echo "Updating /etc from ${dev}..." 15mount -o rdonly ${dev} /fd && \ 16{ cd /fd; cp -Rp etc root / ; cd / ; umount /fd ; }
|
24cd /etc 25#rm files to stop overwrite warning 26for i in *; do
| 17cd /etc 18#rm files to stop overwrite warning 19for i in *; do
|
27 if [ -f $i.gz ]; then 28 rm $i 29 fi
| 20 [ -f $i.gz ] && rm $i
|
30done 31gzip -d *.gz
| 21done 22gzip -d *.gz
|
32pwd_mkdb -p ./master.passwd 33echo "Ok. (Now you can remove ${dev} if you like)" 34echo "" 35. rc
| 23. rc1
|
36exit 0
| 24exit 0
|