summaryrefslogtreecommitdiffstats
path: root/urunlevel/my_linux/Trinux/savecfg
diff options
context:
space:
mode:
Diffstat (limited to 'urunlevel/my_linux/Trinux/savecfg')
-rwxr-xr-xurunlevel/my_linux/Trinux/savecfg38
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
3echo
4echo "Trinux will save configuration information to the /tux directory"
5echo "on a DOS formatted floppy or to C:\trinux\tux\ if you booted "
6echo "from a fixed disk using loadlin"
7
8if [ -f /etc/proc/boot ]
9then
10 BOOT=`cat /etc/proc/boot`
11else
12 BOOT="/dev/fd0"
13fi
14
15echo
16echo "Boot device: $BOOT"
17
18if [ "$BOOT" = "/dev/fd0" ]
19then
20 echo -n "Please enter your boot/config floppy, then hit return: "
21 read blah
22else
23 PREFIX="/trinux"
24fi
25
26if mount -t vfat $BOOT /boot
27then
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
36else
37 echo "Unable to mount boot device!"
38fi