summaryrefslogtreecommitdiff
path: root/packages/nslu2-binary-only/unslung-rootfs/linuxrc
diff options
context:
space:
mode:
authorRod Whitby <rod@whitby.id.au>2005-06-12 13:31:17 +0000
committerRod Whitby <rod@whitby.id.au>2005-06-12 13:31:17 +0000
commit4e66c731de81cb18404d5f5ac9ce3e6bdc6ba3b8 (patch)
tree294a20672b761b6e06fb27d1ab5d29325847b976 /packages/nslu2-binary-only/unslung-rootfs/linuxrc
parenta623f68e361b46449ecf728f9212733cd1677a95 (diff)
Unslung 5.4-alpha: Removed all trace of maintenance mode, and also removed support for rootfs on jffs2 but packages on external disk. Disabled download, and ourtelnetrescue user generation. Added disk auto-wait countdown (courtesy of glc).
BKrev: 42ac3925nzkbB6d52ln11mRo8BflKA
Diffstat (limited to 'packages/nslu2-binary-only/unslung-rootfs/linuxrc')
-rw-r--r--packages/nslu2-binary-only/unslung-rootfs/linuxrc29
1 files changed, 13 insertions, 16 deletions
diff --git a/packages/nslu2-binary-only/unslung-rootfs/linuxrc b/packages/nslu2-binary-only/unslung-rootfs/linuxrc
index b512a286a6..af694bc68d 100644
--- a/packages/nslu2-binary-only/unslung-rootfs/linuxrc
+++ b/packages/nslu2-binary-only/unslung-rootfs/linuxrc
@@ -6,11 +6,7 @@
# Determine the desired rootfs based on user flag files.
-if [ -f /.ramdisk ] ; then
- /bin/echo "Preferred root device is /dev/ram0 (maintenence)"
- mounted=/mnt
- prefroot=maintenence
-elif [ -f /.sda1root ] ; then
+if [ -f /.sda1root ] ; then
/bin/echo "Preferred root device is /dev/sda1 (disk 1)"
mounted=/mnt
prefroot=sda1
@@ -42,8 +38,18 @@ fi
/bin/mount -t proc proc /proc
if [ $prefroot = "sda1" -o $prefroot = "sda2" -o $prefroot = "sdb1" -o $prefroot = "sdb2" ] ; then
- /bin/echo "Sleeping 10sec while waiting for disk..."
- sleep 10
+ /bin/echo "Sleeping while waiting for disk..."
+ cnt=20
+ while [ $cnt -gt 0 ] ; do
+ echo -ne "\r$cnt "
+ sleep 1
+ [ $prefroot = "sda1" ] && [ -f /proc/hd_conn ] && cnt=0
+ [ $prefroot = "sda2" ] && [ -f /proc/hd_conn ] && cnt=0
+ [ $prefroot = "sdb1" ] && [ -f /proc/hd2_conn ] && cnt=0
+ [ $prefroot = "sdb2" ] && [ -f /proc/hd2_conn ] && cnt=0
+ cnt=`expr $cnt - 1`
+ done
+ echo
/bin/mount -rt ext3 /dev/$prefroot /mnt
if [ -L /mnt/sbin/init -o -x /mnt/sbin/init -o \
-L /mnt/bin/init -o -x /mnt/bin/init ] ; then
@@ -56,15 +62,6 @@ if [ $prefroot = "sda1" -o $prefroot = "sda2" -o $prefroot = "sdb1" -o $prefroot
fi
fi
-if [ $prefroot = "maintenence" ] ; then
- /bin/dd if=/dev/zero of=/dev/ram0 bs=1k count=12k 2>/dev/null
- /usr/bin/mke2fs -m 0 /dev/ram0 12288
- /bin/mount -t ext2 /dev/ram0 /mnt
- ( /usr/bin/find . -print0 -mount | /usr/bin/cpio -p -0 -d -m -u /mnt )
- /bin/rm -f /mnt/linuxrc
- /bin/mkdir /mnt/mnt/backup /mnt/mnt/repair /mnt/mnt/tmpmnt
-fi
-
if [ $prefroot = "nfsroot" ] ; then
sysconflen=`/bin/dd if=/dev/mtd1 bs=4 count=1 2>/dev/null | /usr/bin/hexdump -n 6 -e '"%02d"'`