diff options
author | Rod Whitby <rod@whitby.id.au> | 2005-06-12 13:31:17 +0000 |
---|---|---|
committer | Rod Whitby <rod@whitby.id.au> | 2005-06-12 13:31:17 +0000 |
commit | 4e66c731de81cb18404d5f5ac9ce3e6bdc6ba3b8 (patch) | |
tree | 294a20672b761b6e06fb27d1ab5d29325847b976 /packages | |
parent | a623f68e361b46449ecf728f9212733cd1677a95 (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')
33 files changed, 324 insertions, 140 deletions
diff --git a/packages/nslu2-binary-only/unslung-rootfs/NOTES b/packages/nslu2-binary-only/unslung-rootfs/NOTES index 5311df1a1f..691b921845 100644 --- a/packages/nslu2-binary-only/unslung-rootfs/NOTES +++ b/packages/nslu2-binary-only/unslung-rootfs/NOTES @@ -434,3 +434,12 @@ Removed the ipkg link, and made unsling put it back on an external disk. 5.3: Replaced maintenance mode with code to allow entry into RedBoot Upgrade Mode. + +5.4: + +Removed all maintenance mode support, and also removed support for rootfs on +jffs2 but packages on external disk (it's either all or nothing). +Removed unused /mnt/sda1, /mnt/sda2, /mnt/sdb1, and /mnt/sdb2. +Disabled the download process (superceded by upgrade mode). +Disabled the generation of the "ourtelnetrescue" user (too insecure). +Added disk auto-wait countdown to /linuxrc (courtesy of glc). diff --git a/packages/nslu2-binary-only/unslung-rootfs/create-ramdisks.patch b/packages/nslu2-binary-only/unslung-rootfs/create-ramdisks.patch index 7245c46b35..5ba8bc6607 100644 --- a/packages/nslu2-binary-only/unslung-rootfs/create-ramdisks.patch +++ b/packages/nslu2-binary-only/unslung-rootfs/create-ramdisks.patch @@ -6,7 +6,7 @@ -/bin/echo "Creating ramfs for /var/lock/samba:"; mount -t ramfs none /var/lock/samba -o maxsize=64 -/bin/echo "Limit the space of log folder:"; mount -t ramfs none /var/log -o maxsize=128 + -+if ( [ ! -f /.ramdisk ] && [ ! -f /.sda1root ] && [ ! -f /.sda2root ] && [ ! -f /.sdb1root ] && [ ! -f /.sdb2root ] ) ; then ++if ( [ ! -f /.sda1root ] && [ ! -f /.sda2root ] && [ ! -f /.sdb1root ] && [ ! -f /.sdb2root ] ) ; then + /bin/echo "Creating ramfs for /dev:" + /bin/mount -t ramfs ramfs /mnt/tmpmnt + /bin/cp -rp /dev/* /mnt/tmpmnt/ diff --git a/packages/nslu2-binary-only/unslung-rootfs/initialise-mtab.patch b/packages/nslu2-binary-only/unslung-rootfs/initialise-mtab.patch index e69de29bb2..fb4e1982f2 100644 --- a/packages/nslu2-binary-only/unslung-rootfs/initialise-mtab.patch +++ b/packages/nslu2-binary-only/unslung-rootfs/initialise-mtab.patch @@ -0,0 +1,8 @@ +--- nslu2-linksys-ramdisk-2.3r25/etc/rc~ 2004-11-21 21:43:35.000000000 +1030 ++++ nslu2-linksys-ramdisk-2.3r25/etc/rc 2004-11-21 21:49:54.000000000 +1030 +@@ -6,2 +6,5 @@ + mount -t proc proc /proc + mount -o remount,rw /dev/root / ++ ++sed -n -e '/^#/p' < /etc/fstab > /etc/mtab ++ diff --git a/packages/nslu2-binary-only/unslung-rootfs/ipkg.conf b/packages/nslu2-binary-only/unslung-rootfs/ipkg.conf deleted file mode 100644 index e69de29bb2..0000000000 --- a/packages/nslu2-binary-only/unslung-rootfs/ipkg.conf +++ /dev/null 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"'` diff --git a/packages/nslu2-binary-only/unslung-rootfs/maintmode.cgi b/packages/nslu2-binary-only/unslung-rootfs/maintmode.cgi deleted file mode 100644 index e69de29bb2..0000000000 --- a/packages/nslu2-binary-only/unslung-rootfs/maintmode.cgi +++ /dev/null diff --git a/packages/nslu2-binary-only/unslung-rootfs/rc-diversion.patch b/packages/nslu2-binary-only/unslung-rootfs/rc-diversion.patch index cf0b3c1cc5..34e1e795cf 100644 --- a/packages/nslu2-binary-only/unslung-rootfs/rc-diversion.patch +++ b/packages/nslu2-binary-only/unslung-rootfs/rc-diversion.patch @@ -1,6 +1,6 @@ --- nslu2-linksys-ramdisk-2.3r25/etc/rc~ 2004-07-27 23:37:55.000000000 -0400 +++ nslu2-linksys-ramdisk-2.3r25/etc/rc 2004-09-01 21:47:47.000000000 -0400 -@@ -1,4 +1,41 @@ +@@ -1,4 +1,7 @@ ## Simple beta script to verify csr + +if ( [ -f /unslung/rc ] && . /unslung/rc ) ; then return 0 ; fi @@ -8,37 +8,3 @@ /usr/bin/Set_Led r_blinking & mount -t proc proc /proc mount -o remount,rw /dev/root / -+ -+if [ -f /.ramdisk ] ; then -+ echo "Root filesystem is running in maintenance mode ..." -+elif ( [ -f /.sda1root ] || [ -f /.sdb1root ] || [ -f /.sda2root ] || [ -f /.sdb2root ] ) ; then -+ echo "Root filesystem is running from an external disk ..." -+else -+ echo "Root filesystem is running from jffs2 ..." -+fi -+ -+# Wait for the USB disks to be recognised. -+sleep 10 -+ -+if ( [ -f /proc/hd_conn ] ) ; then -+ if ( [ -f /.sda1root ] ) ; then -+ /bin/mount -t ext3 /dev/sda1 /share/hdd/data -+ /bin/rm -rf /mnt/sda1 ; /bin/ln -s /share/hdd/data /mnt/sda1 -+ fi -+ if ( [ -f /.sda2root ] ) ; then -+ /bin/mount -t ext3 /dev/sda2 /share/hdd/conf -+ /bin/rm -rf /mnt/sda2 ; /bin/ln -s /share/hdd/conf /mnt/sda2 -+ fi -+fi -+ -+if ( [ -f /proc/hd2_conn ] ) ; then -+ if ( [ -f /.sdb1root ] ) ; then -+ /bin/mount -t ext3 /dev/sdb2 /share/flash/data -+ /bin/rm -rf /mnt/sdb1 ; /bin/ln -s /share/flash/data /mnt/sdb1 -+ fi -+ if ( [ -f /.sdb2root ] ) ; then -+ /bin/mount -t ext3 /dev/sdb2 /share/flash/conf -+ /bin/rm -rf /mnt/sdb2 ; /bin/ln -s /share/flash/conf /mnt/sdb2 -+ fi -+fi -+ diff --git a/packages/nslu2-binary-only/unslung-rootfs/rc.1-diversion.patch b/packages/nslu2-binary-only/unslung-rootfs/rc.1-diversion.patch index e69de29bb2..8d9f1f6353 100644 --- a/packages/nslu2-binary-only/unslung-rootfs/rc.1-diversion.patch +++ b/packages/nslu2-binary-only/unslung-rootfs/rc.1-diversion.patch @@ -0,0 +1,19 @@ +--- nslu2-linksys-ramdisk-2.3r25/etc/rc.d/rc.1~ 2004-07-27 23:37:55.000000000 -0400 ++++ nslu2-linksys-ramdisk-2.3r25/etc/rc.d/rc.1 2004-09-01 21:56:17.000000000 -0400 +@@ -1,5 +1,7 @@ + #!/bin/sh + ++if ( [ -f /unslung/rc.1 ] && . /unslung/rc.1 ) ; then return 0 ; fi ++ + #/sbin/ifconfig ixp0 hw ether 00:C0:02:01:01:04 + /bin/echo "Starting Set CGI_ds.conf:"; /etc/rc.d/rc.bootbin; check_status + +@@ -17,6 +19,8 @@ + /bin/echo "Starting Crond :"; . /etc/rc.d/rc.crond + /bin/echo "Starting Rest Task :"; . /etc/rc.d/rc.local + ++/bin/echo "Starting UNSLUNG Packages:"; ( . /etc/rc.d/rc.unslung-start ) ++ + /usr/bin/Set_Led ready + /usr/bin/Set_Led beep1 + /bin/echo "Checking disk status :"; /usr/sbin/CheckDiskFull 2 >/dev/null diff --git a/packages/nslu2-binary-only/unslung-rootfs/rc.bootbin b/packages/nslu2-binary-only/unslung-rootfs/rc.bootbin index e69de29bb2..42959e8b80 100644 --- a/packages/nslu2-binary-only/unslung-rootfs/rc.bootbin +++ b/packages/nslu2-binary-only/unslung-rootfs/rc.bootbin @@ -0,0 +1,7 @@ +#!/bin/sh + +if ( [ -f /unslung/rc.bootbin ] && . /unslung/rc.bootbin ) ; then return 0 ; fi + +/sbin/rc.bootbin + +return 0
\ No newline at end of file diff --git a/packages/nslu2-binary-only/unslung-rootfs/rc.crond-diversion.patch b/packages/nslu2-binary-only/unslung-rootfs/rc.crond-diversion.patch index e69de29bb2..c770b2ac83 100644 --- a/packages/nslu2-binary-only/unslung-rootfs/rc.crond-diversion.patch +++ b/packages/nslu2-binary-only/unslung-rootfs/rc.crond-diversion.patch @@ -0,0 +1,10 @@ +--- nslu2-linksys-ramdisk-2.3r25/etc/rc.d/rc.crond.orig 2004-07-27 23:37:55.000000000 -0400 ++++ nslu2-linksys-ramdisk-2.3r25/etc/rc.d/rc.crond 2004-09-01 21:56:37.000000000 -0400 +@@ -1,5 +1,7 @@ + #!/bin/sh + ++if ( [ -r /unslung/rc.crond ] && . /unslung/rc.crond ) ; then return 0 ; fi ++ + if [ -n "`pidof crond`" ] ;then + /bin/killall crond 2>/dev/null + fi diff --git a/packages/nslu2-binary-only/unslung-rootfs/rc.halt-diversion.patch b/packages/nslu2-binary-only/unslung-rootfs/rc.halt-diversion.patch index e69de29bb2..4723dfad82 100644 --- a/packages/nslu2-binary-only/unslung-rootfs/rc.halt-diversion.patch +++ b/packages/nslu2-binary-only/unslung-rootfs/rc.halt-diversion.patch @@ -0,0 +1,12 @@ +--- nslu2-linksys-ramdisk-2.3r25/etc/rc.d/rc.halt.orig 2004-07-27 23:37:55.000000000 -0400 ++++ nslu2-linksys-ramdisk-2.3r25/etc/rc.d/rc.halt 2004-09-01 21:57:01.000000000 -0400 +@@ -1,4 +1,9 @@ + #!/bin/sh ++ ++if ( [ -r /unslung/rc.halt ] && . /unslung/rc.halt ) ; then return 0 ; fi ++ ++/bin/echo "Stopping UNSLUNG Packages:"; ( . /etc/rc.d/rc.unslung-stop ) ++ + /bin/killall -2 upnpd &>/dev/null + /bin/killall nmbd &>/dev/null + /bin/killall smbd &>/dev/null diff --git a/packages/nslu2-binary-only/unslung-rootfs/rc.local-diversion.patch b/packages/nslu2-binary-only/unslung-rootfs/rc.local-diversion.patch index e69de29bb2..335dc85835 100644 --- a/packages/nslu2-binary-only/unslung-rootfs/rc.local-diversion.patch +++ b/packages/nslu2-binary-only/unslung-rootfs/rc.local-diversion.patch @@ -0,0 +1,12 @@ +--- nslu2-linksys-ramdisk-2.3r25/etc/rc.d/rc.local.orig 2004-07-27 23:37:55.000000000 -0400 ++++ nslu2-linksys-ramdisk-2.3r25/etc/rc.d/rc.local 2004-09-01 21:57:17.000000000 -0400 +@@ -1,5 +1,9 @@ + #!/bin/sh ++ + HOSTNAME=`hostname` ++ ++if ( [ -r /unslung/rc.local ] && . /unslung/rc.local ) ; then return 0 ; fi ++ + /usr/sbin/CheckResetButton 2>/dev/null + /usr/sbin/CheckPowerButton 2>/dev/null + /usr/sbin/do_umount 2>/dev/null diff --git a/packages/nslu2-binary-only/unslung-rootfs/rc.modules-diversion.patch b/packages/nslu2-binary-only/unslung-rootfs/rc.modules-diversion.patch index e69de29bb2..a2bfb1545c 100644 --- a/packages/nslu2-binary-only/unslung-rootfs/rc.modules-diversion.patch +++ b/packages/nslu2-binary-only/unslung-rootfs/rc.modules-diversion.patch @@ -0,0 +1,10 @@ +--- nslu2-linksys-ramdisk-2.3r25/etc/rc.d/rc.modules.orig 2004-07-27 23:37:55.000000000 -0400 ++++ nslu2-linksys-ramdisk-2.3r25/etc/rc.d/rc.modules 2004-09-01 21:57:34.000000000 -0400 +@@ -1,4 +1,7 @@ + #!/bin/sh ++ ++if ( [ -f /unslung/rc.modules ] && . /unslung/rc.modules ) ; then return 0 ; fi ++ + insmod pbuttons &>/dev/null + insmod rbuttons &>/dev/null + insmod x1226-rtc &>/dev/null diff --git a/packages/nslu2-binary-only/unslung-rootfs/rc.network-diversion.patch b/packages/nslu2-binary-only/unslung-rootfs/rc.network-diversion.patch index e69de29bb2..0cb2a66666 100644 --- a/packages/nslu2-binary-only/unslung-rootfs/rc.network-diversion.patch +++ b/packages/nslu2-binary-only/unslung-rootfs/rc.network-diversion.patch @@ -0,0 +1,9 @@ +--- nslu2-linksys-ramdisk-2.3r25/etc/rc.d/rc.network.orig 2004-07-27 23:37:55.000000000 -0400 ++++ nslu2-linksys-ramdisk-2.3r25/etc/rc.d/rc.network 2004-09-01 21:57:46.000000000 -0400 +@@ -1,3 +1,6 @@ + #!/bin/sh ++ ++if ( [ -f /unslung/rc.network ] && . /unslung/rc.network ) ; then return 0 ; fi ++ + /sbin/ifup; #check_status + /bin/echo "call rc.network!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" diff --git a/packages/nslu2-binary-only/unslung-rootfs/rc.quickset-diversion.patch b/packages/nslu2-binary-only/unslung-rootfs/rc.quickset-diversion.patch index e69de29bb2..df6534daca 100644 --- a/packages/nslu2-binary-only/unslung-rootfs/rc.quickset-diversion.patch +++ b/packages/nslu2-binary-only/unslung-rootfs/rc.quickset-diversion.patch @@ -0,0 +1,9 @@ +--- nslu2-linksys-ramdisk-2.3r25/etc/rc.d/rc.quickset.orig 2004-07-27 23:37:55.000000000 -0400 ++++ nslu2-linksys-ramdisk-2.3r25/etc/rc.d/rc.quickset 2004-09-01 21:57:57.000000000 -0400 +@@ -1,3 +1,6 @@ + #!/bin/sh ++ ++if ( [ -f /unslung/rc.quickset ] && . /unslung/rc.quickset ) ; then return 0 ; fi ++ + /usr/sbin/QuickSet; check_status + /usr/sbin/USB_Detect; check_status diff --git a/packages/nslu2-binary-only/unslung-rootfs/rc.quota-diversion.patch b/packages/nslu2-binary-only/unslung-rootfs/rc.quota-diversion.patch index e69de29bb2..288ef1929c 100644 --- a/packages/nslu2-binary-only/unslung-rootfs/rc.quota-diversion.patch +++ b/packages/nslu2-binary-only/unslung-rootfs/rc.quota-diversion.patch @@ -0,0 +1,10 @@ +--- nslu2-linksys-ramdisk-2.3r25/etc/rc.d/rc.quota.orig 2004-07-27 23:37:55.000000000 -0400 ++++ nslu2-linksys-ramdisk-2.3r25/etc/rc.d/rc.quota 2004-09-01 21:58:08.000000000 -0400 +@@ -1,5 +1,7 @@ + #!/bin/sh + ++if ( [ -f /unslung/rc.quota ] && . /unslung/rc.quota ) ; then return 0 ; fi ++ + # Check and turn on disk quota. + if [ -x "/usr/bin/quotacheck" ] + then diff --git a/packages/nslu2-binary-only/unslung-rootfs/rc.reboot-diversion.patch b/packages/nslu2-binary-only/unslung-rootfs/rc.reboot-diversion.patch index e69de29bb2..2b8bf64c76 100644 --- a/packages/nslu2-binary-only/unslung-rootfs/rc.reboot-diversion.patch +++ b/packages/nslu2-binary-only/unslung-rootfs/rc.reboot-diversion.patch @@ -0,0 +1,12 @@ +--- nslu2-linksys-ramdisk-2.3r25/etc/rc.d/rc.reboot.orig 2004-07-27 23:37:55.000000000 -0400 ++++ nslu2-linksys-ramdisk-2.3r25/etc/rc.d/rc.reboot 2004-09-01 21:58:19.000000000 -0400 +@@ -1,4 +1,9 @@ + #!/bin/sh ++ ++if ( [ -r /unslung/rc.reboot ] && . /unslung/rc.reboot ) ; then return 0 ; fi ++ ++/bin/echo "Stopping UNSLUNG Packages:"; ( . /etc/rc.d/rc.unslung-stop ) ++ + /bin/killall -2 upnpd 2>/dev/null + sleep 4 + /sbin/ifdown ixp0 diff --git a/packages/nslu2-binary-only/unslung-rootfs/rc.reset_usrgrpshare-diversion.patch b/packages/nslu2-binary-only/unslung-rootfs/rc.reset_usrgrpshare-diversion.patch index e69de29bb2..c01804bb68 100644 --- a/packages/nslu2-binary-only/unslung-rootfs/rc.reset_usrgrpshare-diversion.patch +++ b/packages/nslu2-binary-only/unslung-rootfs/rc.reset_usrgrpshare-diversion.patch @@ -0,0 +1,8 @@ +--- nslu2-linksys-ramdisk-2.3r25/etc/rc.d/rc.reset_usrgrpshare.orig 2004-07-27 23:37:55.000000000 -0400 ++++ nslu2-linksys-ramdisk-2.3r25/etc/rc.d/rc.reset_usrgrpshare 2004-09-01 21:58:36.000000000 -0400 +@@ -1,2 +1,5 @@ + #!/bin/sh ++ ++if ( [ -f /unslung/rc.reset_usrgrpshare ] && . /unslung/rc.reset_usrgrpshare ) ; then return 0 ; fi ++ + /usr/sbin/reset_ugs; diff --git a/packages/nslu2-binary-only/unslung-rootfs/rc.rstimezone-diversion.patch b/packages/nslu2-binary-only/unslung-rootfs/rc.rstimezone-diversion.patch index e69de29bb2..19b020fcbc 100644 --- a/packages/nslu2-binary-only/unslung-rootfs/rc.rstimezone-diversion.patch +++ b/packages/nslu2-binary-only/unslung-rootfs/rc.rstimezone-diversion.patch @@ -0,0 +1,10 @@ +--- nslu2-linksys-ramdisk-2.3r25/etc/rc.d/rc.rstimezone.orig 2004-07-27 23:37:55.000000000 -0400 ++++ nslu2-linksys-ramdisk-2.3r25/etc/rc.d/rc.rstimezone 2004-09-01 21:58:47.000000000 -0400 +@@ -1,4 +1,7 @@ + #!/bin/sh ++ ++if ( [ -f /unslung/rc.rstimezone ] && . /unslung/rc.rstimezone ) ; then return 0 ; fi ++ + #TIME=`/usr/sbin/hwclock` + /usr/sbin/Set_TimeZone >/dev/null + #/bin/date -s "$TIME" diff --git a/packages/nslu2-binary-only/unslung-rootfs/rc.samba-diversion.patch b/packages/nslu2-binary-only/unslung-rootfs/rc.samba-diversion.patch index e69de29bb2..322aa5fe33 100644 --- a/packages/nslu2-binary-only/unslung-rootfs/rc.samba-diversion.patch +++ b/packages/nslu2-binary-only/unslung-rootfs/rc.samba-diversion.patch @@ -0,0 +1,10 @@ +--- nslu2-linksys-ramdisk-2.3r25/etc/rc.d/rc.samba.orig 2004-07-27 23:37:55.000000000 -0400 ++++ nslu2-linksys-ramdisk-2.3r25/etc/rc.d/rc.samba 2004-09-01 21:58:57.000000000 -0400 +@@ -1,4 +1,7 @@ + #!/bin/sh ++ ++if ( [ -f /unslung/rc.samba ] && . /unslung/rc.samba ) ; then return 0 ; fi ++ + if [ -n "`pidof smbd`" ] ; then + killall smbd 2>/dev/null + fi diff --git a/packages/nslu2-binary-only/unslung-rootfs/rc.sysinit-diversion.patch b/packages/nslu2-binary-only/unslung-rootfs/rc.sysinit-diversion.patch index e69de29bb2..c929424457 100644 --- a/packages/nslu2-binary-only/unslung-rootfs/rc.sysinit-diversion.patch +++ b/packages/nslu2-binary-only/unslung-rootfs/rc.sysinit-diversion.patch @@ -0,0 +1,15 @@ +--- nslu2-linksys-ramdisk-2.3r25/etc/rc.d/rc.sysinit.orig 2004-07-27 23:37:55.000000000 -0400 ++++ nslu2-linksys-ramdisk-2.3r25/etc/rc.d/rc.sysinit 2004-09-01 21:59:04.000000000 -0400 +@@ -1,7 +1,11 @@ + #!/bin/sh +-export PATH=/bin:/sbin:/usr/bin:/usr/sbin ++export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/opt/bin:/opt/sbin ++ + . /etc/rc.d/rc.functions + . /etc/sysconfig/network ++ ++if ( [ -f /unslung/rc.sysinit ] && . /unslung/rc.sysinit ) ; then return 0 ; fi ++ + mkdir -p /var/lock/samba >/dev/null + /bin/echo "Creating ramfs for /var/lock/samba:"; mount -t ramfs none /var/lock/samba -o maxsize=64 + /bin/echo "Limit the space of log folder:"; mount -t ramfs none /var/log -o maxsize=128 diff --git a/packages/nslu2-binary-only/unslung-rootfs/rc.thttpd-diversion.patch b/packages/nslu2-binary-only/unslung-rootfs/rc.thttpd-diversion.patch index e69de29bb2..35528ef71e 100644 --- a/packages/nslu2-binary-only/unslung-rootfs/rc.thttpd-diversion.patch +++ b/packages/nslu2-binary-only/unslung-rootfs/rc.thttpd-diversion.patch @@ -0,0 +1,10 @@ +--- nslu2-linksys-ramdisk-2.3r25/etc/rc.d/rc.thttpd.orig 2004-07-27 23:37:55.000000000 -0400 ++++ nslu2-linksys-ramdisk-2.3r25/etc/rc.d/rc.thttpd 2004-09-01 21:59:13.000000000 -0400 +@@ -1,4 +1,7 @@ + #!/bin/sh ++ ++if ( [ -f /unslung/rc.thttpd ] && . /unslung/rc.thttpd ) ; then return 0 ; fi ++ + if [ -n "`pidof thttpd`" ] ;then + /bin/killall thttpd 2>/dev/null + fi diff --git a/packages/nslu2-binary-only/unslung-rootfs/rc.unslung-start b/packages/nslu2-binary-only/unslung-rootfs/rc.unslung-start index e69de29bb2..f738761644 100644 --- a/packages/nslu2-binary-only/unslung-rootfs/rc.unslung-start +++ b/packages/nslu2-binary-only/unslung-rootfs/rc.unslung-start @@ -0,0 +1,27 @@ +#!/bin/sh + +if ( [ -f /unslung/rc.unslung-start ] && . /unslung/rc.unslung-start ) ; then return 0 ; fi + +# Start all init scripts in /opt/etc/init.d +# executing them in numerical order. +# +for i in /opt/etc/init.d/S??* ;do + + # Ignore dangling symlinks (if any). + [ ! -f "$i" ] && continue + + case "$i" in + *.sh) + # Source shell script for speed. + ( + trap - INT QUIT TSTP + set start + . $i + ) + ;; + *) + # No sh extension, so fork subprocess. + $i start + ;; + esac +done diff --git a/packages/nslu2-binary-only/unslung-rootfs/rc.unslung-stop b/packages/nslu2-binary-only/unslung-rootfs/rc.unslung-stop index e69de29bb2..cf5c6ede67 100644 --- a/packages/nslu2-binary-only/unslung-rootfs/rc.unslung-stop +++ b/packages/nslu2-binary-only/unslung-rootfs/rc.unslung-stop @@ -0,0 +1,27 @@ +#!/bin/sh + +if ( [ -f /unslung/rc.unslung-stop ] && . /unslung/rc.unslung-stop ) ; then return 0 ; fi + +# Stop all init scripts in /opt/etc/init.d +# executing them in numerical order. +# +for i in /opt/etc/init.d/K??* ;do + + # Ignore dangling symlinks (if any). + [ ! -f "$i" ] && continue + + case "$i" in + *.sh) + # Source shell script for speed. + ( + trap - INT QUIT TSTP + set stop + . $i + ) + ;; + *) + # No sh extension, so fork subprocess. + $i stop + ;; + esac +done diff --git a/packages/nslu2-binary-only/unslung-rootfs/rc.xinetd-diversion.patch b/packages/nslu2-binary-only/unslung-rootfs/rc.xinetd-diversion.patch index e69de29bb2..c99ed7c1ec 100644 --- a/packages/nslu2-binary-only/unslung-rootfs/rc.xinetd-diversion.patch +++ b/packages/nslu2-binary-only/unslung-rootfs/rc.xinetd-diversion.patch @@ -0,0 +1,10 @@ +--- nslu2-linksys-ramdisk-2.3r25/etc/rc.d/rc.xinetd.orig 2004-07-27 23:37:55.000000000 -0400 ++++ nslu2-linksys-ramdisk-2.3r25/etc/rc.d/rc.xinetd 2004-09-01 21:59:34.000000000 -0400 +@@ -1,4 +1,7 @@ + #!/bin/sh ++ ++if ( [ -f /unslung/rc.xinetd ] && . /unslung/rc.xinetd ) ; then return 0 ; fi ++ + if [ -n "`pidof inetd`" ] ;then + killall inetd 2>/dev/null + # killall -9 inetd &>/dev/null diff --git a/packages/nslu2-binary-only/unslung-rootfs/remount-noatime.patch b/packages/nslu2-binary-only/unslung-rootfs/remount-noatime.patch index e69de29bb2..e728657ffa 100644 --- a/packages/nslu2-binary-only/unslung-rootfs/remount-noatime.patch +++ b/packages/nslu2-binary-only/unslung-rootfs/remount-noatime.patch @@ -0,0 +1,31 @@ +--- nslu2-linksys-ramdisk-2.3r25/etc/rc.d/rc.1~ 2004-11-09 21:45:52.000000000 +1030 ++++ nslu2-linksys-ramdisk-2.3r25/etc/rc.d/rc.1 2004-11-09 21:44:27.000000000 +1030 +@@ -27,6 +27,14 @@ + #/sbin/ifconfig ixp0 hw ether 00:C0:02:01:01:04 + /bin/echo "Starting Set CGI_ds.conf:"; /etc/rc.d/rc.bootbin; check_status + ++if ( [ -f /.ext3flash ] ) ; then ++ /bin/echo "Remounting /dev/sda1 as ext3flash:" ++ /bin/mount -o remount,rw,noatime /dev/sda1 ++ /bin/echo "Remounting /dev/sda2 as ext3flash:" ++ /bin/mount -o remount,rw,noatime /dev/sda2 ++ /bin/echo "Removing swap from ext3flash:" ++ /sbin/swapoff /dev/sda3 ++fi + + /bin/echo "Restore time and timezone:"; /etc/rc.d/rc.rstimezone; check_status + /bin/echo "Restore usrgrpshares:"; /etc/rc.d/rc.reset_usrgrpshare; check_status +--- nslu2-linksys-ramdisk-2.3r25/etc/rc.d/rc.quota~ 2004-11-11 00:05:21.000000000 +1030 ++++ nslu2-linksys-ramdisk-2.3r25/etc/rc.d/rc.quota 2004-11-11 00:04:52.000000000 +1030 +@@ -14,6 +14,11 @@ + echo "Done." + fi + ++if ( [ -f /.ext3flash ] ) ; then ++ /bin/echo "Remounting /dev/sda1 as ext3flash:" ++ /bin/mount -o remount,rw,noatime /dev/sda1 ++fi ++ + if [ -x "/usr/bin/quotaon" ] + then + echo "Turning on quota." diff --git a/packages/nslu2-binary-only/unslung-rootfs/ipkg-link b/packages/nslu2-binary-only/unslung-rootfs/security-fixes.patch index e69de29bb2..e69de29bb2 100644 --- a/packages/nslu2-binary-only/unslung-rootfs/ipkg-link +++ b/packages/nslu2-binary-only/unslung-rootfs/security-fixes.patch diff --git a/packages/nslu2-binary-only/unslung-rootfs/tmp-handling.patch b/packages/nslu2-binary-only/unslung-rootfs/tmp-handling.patch index e69de29bb2..85e1ecbf80 100644 --- a/packages/nslu2-binary-only/unslung-rootfs/tmp-handling.patch +++ b/packages/nslu2-binary-only/unslung-rootfs/tmp-handling.patch @@ -0,0 +1,13 @@ +--- nslu2-linksys-ramdisk-2.3r25/etc/rc.d/rc.1.orig 2005-01-16 09:37:41.000000000 +1030 ++++ nslu2-linksys-ramdisk-2.3r25/etc/rc.d/rc.1 2005-01-16 09:42:09.000000000 +1030 +@@ -33,6 +33,10 @@ + /bin/echo "Starting download:"; /usr/sbin/download + /bin/echo "Starting INET Server:"; . /etc/rc.d/rc.xinetd; check_status ++if ( [ ! -f /.sda1root ] && [ ! -f /.sda2root ] && [ ! -f /.sdb1root ] && [ ! -f /.sdb2root ] ) ; then + /bin/echo "Creating ramfs for /tmp:"; mount -t ramfs none /tmp -o maxsize=512 ++fi ++/bin/rm -rf /tmp/* /mnt/backup/* ++/bin/chmod 1777 /tmp + /bin/echo "Starting QuickSet Daemon :"; . /etc/rc.d/rc.quickset + /bin/echo "Starting Crond :"; . /etc/rc.d/rc.crond + /bin/echo "Starting Rest Task :"; . /etc/rc.d/rc.local diff --git a/packages/nslu2-binary-only/unslung-rootfs/unsling b/packages/nslu2-binary-only/unslung-rootfs/unsling index 6e5a5ef8c3..b784378812 100644 --- a/packages/nslu2-binary-only/unslung-rootfs/unsling +++ b/packages/nslu2-binary-only/unslung-rootfs/unsling @@ -12,40 +12,22 @@ fi if [ $# -eq 1 ] ; then if [ "$1" = "disk1" ] ; then targ=/share/hdd/data - copy=true flag=.sda1root elif [ "$1" = "disk2" ] ; then targ=/share/flash/data - copy=true flag=.sdb1root elif [ "$1" = "hdd-data" ] ; then targ=/share/hdd/data - copy=true flag=.sda1root elif [ "$1" = "hdd-conf" ] ; then targ=/share/hdd/conf - copy=true flag=.sda2root elif [ "$1" = "flash-data" ] ; then targ=/share/flash/data - copy=true flag=.sdb1root elif [ "$1" = "flash-conf" ] ; then targ=/share/flash/conf - copy=true flag=.sdb2root - elif [ "$1" = "jffs2-hdd-data" ] ; then - targ=/share/hdd/data - copy= - elif [ "$1" = "jffs2-hdd-conf" ] ; then - targ=/share/hdd/conf - copy= - elif [ "$1" = "jffs2-flash-data" ] ; then - targ=/share/flash/data - copy= - elif [ "$1" = "jffs2-flash-conf" ] ; then - targ=/share/flash/conf - copy= else echo $usage exit 1 @@ -68,86 +50,36 @@ fi cd / -if [ -z "$copy" ] ; then +# Save the existing ipkg database. - # Ensure /opt is there. - - if [ ! -d $targ/opt ] ; then - echo "Creating new /opt directory on target disk." - mkdir -p $targ/opt - else - echo "Preserving existing /opt directory on target disk." - fi - - if [ -d /opt -a ! -h /opt ] ; then - echo "Copying existing /opt directory from root disk to target disk." - tar cf - opt | ( cd $targ ; tar xf - ) - mv /opt /opt.old - fi - - echo "Linking /opt directory from target disk to root disk." - rm -f /opt ; ln -s $targ/opt /opt - - # Ensure /usr/lib/ipkg is there. - - if [ ! -d $targ/usr/lib/ipkg ] ; then - echo "Creating new /usr/lib/ipkg directory on target disk." - mkdir -p $targ/usr/lib/ipkg - fi - - if [ ! -f $targ/usr/lib/ipkg/status -a -d /usr/lib/ipkg -a ! -h /usr/lib/ipkg ] ; then - echo "Copying existing /usr/lib/ipkg directory from root disk to target disk." - tar cf - usr/lib/ipkg | ( cd $targ ; tar xf - ) - else - echo "Preserving existing ipkg database on target disk." - fi - - if [ -d /usr/lib/ipkg -a ! -h /usr/lib/ipkg ] ; then - echo "Saving /usr/lib/ipkg directory on root disk in /usr/lib/ipkg.old" - rm -rf /usr/lib/ipkg.old - mv /usr/lib/ipkg /usr/lib/ipkg.old - fi - - echo "Linking /usr/lib/ipkg directory from target disk to root disk." - rm -f /usr/lib/ipkg ; ln -s $targ/usr/lib/ipkg /usr/lib/ipkg - - echo "Linking /usr/bin/ipkg executable on root disk." - rm -f /usr/bin/ipkg ; ln -s /usr/bin/ipkg-cl /usr/bin/ipkg - -else - - # Save the existing ipkg database. - - rm -rf $targ/usr/lib/ipkg.old - if [ -f $targ/usr/lib/ipkg/status ] ; then +rm -rf $targ/usr/lib/ipkg.old +if [ -f $targ/usr/lib/ipkg/status ] ; then mv $targ/usr/lib/ipkg $targ/usr/lib/ipkg.old - fi +fi - # Copy the complete rootfs to the target. +# Copy the complete rootfs to the target. - echo "Copying the complete rootfs from / to $targ." - /usr/bin/find / -print0 -mount | /usr/bin/cpio -p -0 -d -m -u $targ - rm -rf $targ/dev ; mv $targ/dev.state $targ/dev - rm -rf $targ/var ; mv $targ/var.state $targ/var +echo "Copying the complete rootfs from / to $targ." +/usr/bin/find / -print0 -mount | /usr/bin/cpio -p -0 -d -m -u $targ +rm -rf $targ/dev ; mv $targ/dev.state $targ/dev +rm -rf $targ/var ; mv $targ/var.state $targ/var - # Copy over the existing ipkg database. +# Copy over the existing ipkg database. - if [ -f $targ/usr/lib/ipkg.old/status ] ; then +if [ -f $targ/usr/lib/ipkg.old/status ] ; then echo "Preserving existing ipkg database on target disk." ( cd $targ/usr/lib/ipkg.old ; tar cf - . ) | ( cd $targ/usr/lib/ipkg ; tar xf - ) - fi - - echo "Linking /usr/bin/ipkg executable on target disk." - rm -f $targ/usr/bin/ipkg ; ln -s /usr/bin/ipkg-cl $targ/usr/bin/ipkg +fi - # Create the boot flag file. +echo "Linking /usr/bin/ipkg executable on target disk." +rm -f $targ/usr/bin/ipkg ; ln -s /usr/bin/ipkg-cl $targ/usr/bin/ipkg - rm -f /.sd??root $targ/.sd??root /.ramdisk $targ/.ramdisk +# Create the boot flag file. - echo "Creating /$flag to direct switchbox to boot from $targ." - echo > /$flag - echo > $targ/$flag +rm -f /.sd??root $targ/.sd??root -fi +echo "Creating /$flag to direct switchbox to boot from $targ." +echo > /$flag +echo > $targ/$flag exit 0 diff --git a/packages/nslu2-binary-only/unslung-rootfs/upgrade-inhibit.htm b/packages/nslu2-binary-only/unslung-rootfs/upgrade-inhibit.htm deleted file mode 100644 index e69de29bb2..0000000000 --- a/packages/nslu2-binary-only/unslung-rootfs/upgrade-inhibit.htm +++ /dev/null diff --git a/packages/nslu2-binary-only/unslung-rootfs/upgrade-maint.htm b/packages/nslu2-binary-only/unslung-rootfs/upgrade-maint.htm deleted file mode 100644 index e69de29bb2..0000000000 --- a/packages/nslu2-binary-only/unslung-rootfs/upgrade-maint.htm +++ /dev/null diff --git a/packages/nslu2-binary-only/unslung-rootfs/upgrade-nomaint.htm b/packages/nslu2-binary-only/unslung-rootfs/upgrade-nomaint.htm deleted file mode 100644 index e69de29bb2..0000000000 --- a/packages/nslu2-binary-only/unslung-rootfs/upgrade-nomaint.htm +++ /dev/null diff --git a/packages/nslu2-binary-only/unslung-rootfs_2.3r29.bb b/packages/nslu2-binary-only/unslung-rootfs_2.3r29.bb index b362c8dab4..b785481f28 100644 --- a/packages/nslu2-binary-only/unslung-rootfs_2.3r29.bb +++ b/packages/nslu2-binary-only/unslung-rootfs_2.3r29.bb @@ -1,6 +1,6 @@ SECTION = "base" -PR = "r6" +PR = "r8" DEPENDS = "nslu2-linksys-libs" @@ -37,6 +37,7 @@ SRC_URI = "http://nslu.sf.net/downloads/nslu2-linksys-ramdisk-2.3r29.tar.bz2 \ file://initialise-mtab.patch;patch=1 \ file://wait-for-quotacheck.patch;patch=1 \ file://mount_usbdevfs.patch;patch=1 \ + file://security-fixes.patch;patch=1 \ file://upgrade.htm file://upgrade.cgi \ file://rc.bootbin \ " |