summaryrefslogtreecommitdiffstats
path: root/release/picobsd/mfs_tree/etc/rc
blob: e695f694135b7f4dedfb4f055bb9b52719aeb03d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/sh
# $FreeBSD$
### Special setup for one floppy PICOBSD ###
# WARNING !!! We overwrite this file during execution with a new rc file.
# Awful things happen if this file's size is > 1024B

stty status '^T'
trap : 2
trap : 3

HOME=/; export HOME
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin
export PATH
dev="/dev/fd0c" #

trap "echo 'Reboot interrupted'; exit 1" 3
# Copy from MFS version of the files, and then from FS version.
cd /fd; cp -Rp etc root / ; cd /
echo "Reading /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
    if [ -f $i.gz ]; then
	rm $i
    fi
done
gzip -d *.gz
pwd_mkdb -p ./master.passwd
echo "Ok. (Now you can remove ${dev} if you like)"
echo ""
. rc
exit 0
OpenPOWER on IntegriCloud