freebsd-dev/release/picobsd/mfs_tree/etc/rc
2000-05-31 12:27:38 +00:00

30 lines
609 B
Bash

#!/bin/sh
# $FreeBSD$
# WARNING !!! We remove this file during execution (see EOF).
# Awful things happen if its 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
trap "echo 'Reboot interrupted'; exit 1" 3
### Special setup for one floppy PICOBSD ###
set `df /` ; dev="/dev/$8"
echo "Reading /etc from ${dev}..."
mount -o rdonly ${dev} /mnt
cd /mnt/etc ; cp -Rp . /etc/
cp -Rp /mnt/root /
cd /etc
gzip -d *.gz
pwd_mkdb -p ./master.passwd
umount /mnt
echo "Ok. (Now you can remove ${dev} if you like)"
echo ""
. rc
exit 0