freebsd-dev/release/picobsd/mfs_tree/etc/rc
Luigi Rizzo a177be2c24 Use /dev/fd0 instead of /dev/fd0c for mounting the floppy.
This must have to do with the use of devfs in -CURRENT, but i
have no idea when the devfs is actually mounted (is it a
side effect of mount -t nonfs or what ?) and when /dev/fd0c becomes
available.
For the time being, let's use this hack. Once I understand how devfs
works, this can be reverted back to the previous value, and also the
part of the build script which creates device entries can be nuked.
This is for -current only.
2001-06-21 08:53:21 +00:00

37 lines
795 B
Bash

#!/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/fd0"
cp -p /etc/rc /etc/rc.master
trap "echo 'Reboot interrupted'; exit 1" 3
echo "Reading from MFS ..."
cd /fd; cp -Rp etc root / ; cd /
ls /dev
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