diff options
Diffstat (limited to 'urunlevel/my_linux/Trinux/savecfg')
-rwxr-xr-x | urunlevel/my_linux/Trinux/savecfg | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/urunlevel/my_linux/Trinux/savecfg b/urunlevel/my_linux/Trinux/savecfg new file mode 100755 index 0000000..587728b --- /dev/null +++ b/urunlevel/my_linux/Trinux/savecfg | |||
@@ -0,0 +1,38 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | echo | ||
4 | echo "Trinux will save configuration information to the /tux directory" | ||
5 | echo "on a DOS formatted floppy or to C:\trinux\tux\ if you booted " | ||
6 | echo "from a fixed disk using loadlin" | ||
7 | |||
8 | if [ -f /etc/proc/boot ] | ||
9 | then | ||
10 | BOOT=`cat /etc/proc/boot` | ||
11 | else | ||
12 | BOOT="/dev/fd0" | ||
13 | fi | ||
14 | |||
15 | echo | ||
16 | echo "Boot device: $BOOT" | ||
17 | |||
18 | if [ "$BOOT" = "/dev/fd0" ] | ||
19 | then | ||
20 | echo -n "Please enter your boot/config floppy, then hit return: " | ||
21 | read blah | ||
22 | else | ||
23 | PREFIX="/trinux" | ||
24 | fi | ||
25 | |||
26 | if mount -t vfat $BOOT /boot | ||
27 | then | ||
28 | echo "Backing up old configuration" | ||
29 | cd /boot${PREFIX} | ||
30 | rm -r tux.bak 2> /dev/null | ||
31 | mv tux tux.bak | ||
32 | cp -a /etc/tux . | ||
33 | |||
34 | echo "Unmounting $BOOT" | ||
35 | cd /; umount /boot | ||
36 | else | ||
37 | echo "Unable to mount boot device!" | ||
38 | fi | ||