summaryrefslogtreecommitdiffstats
path: root/release/picobsd/floppy.tree/etc/mfs.rc
blob: 79fddf5d18d0cc430badaebfc18d5079bf3a8e49 (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
#!/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
OpenPOWER on IntegriCloud