rc revision 78542
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
12PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin
13export PATH
14dev="/dev/fd0"
15cp -p /etc/rc /etc/rc.master
16
17trap "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
24cd /etc
25#rm files to stop overwrite warning
26for i in *; do
27    if [ -f $i.gz ]; then
28	rm $i
29    fi
30done
31gzip -d *.gz
32pwd_mkdb -p ./master.passwd
33echo "Ok. (Now you can remove ${dev} if you like)"
34echo ""
35. rc
36exit 0
37