summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--BitKeeper/etc/logging_ok1
-rw-r--r--conf/distro/switchbox.conf2
-rw-r--r--packages/busybox/switchbox-1.00/defconfig2
-rw-r--r--packages/busybox/switchbox-1.00/linuxrc199
-rw-r--r--packages/busybox/switchbox_1.00.bb2
-rw-r--r--packages/linux/unslung-standard-kernel_2.3r25.bb4
-rw-r--r--packages/meta/unslung-standard-image.bb4
-rw-r--r--packages/nslu2-binary-only/nslu2-switchbox-firmware.bb4
-rw-r--r--packages/nslu2-binary-only/unslung-rootfs-2.3r25/linuxrc57
-rw-r--r--packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc-diversion.patch5
-rw-r--r--packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.1-diversion.patch4
-rw-r--r--packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.crond-diversion.patch12
-rw-r--r--packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.halt-diversion.patch4
-rw-r--r--packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.local-diversion.patch14
-rw-r--r--packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.modules-diversion.patch12
-rw-r--r--packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.network-diversion.patch11
-rw-r--r--packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.quickset-diversion.patch11
-rw-r--r--packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.quota-diversion.patch12
-rw-r--r--packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.reboot-diversion.patch4
-rw-r--r--packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.reset_usrgrpshare-diversion.patch10
-rw-r--r--packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.rstimezone-diversion.patch12
-rw-r--r--packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.samba-diversion.patch12
-rw-r--r--packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.sysinit-diversion.patch4
-rw-r--r--packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.thttpd-diversion.patch12
-rw-r--r--packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.unslung-start33
-rw-r--r--packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.unslung-stop29
-rw-r--r--packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.xinetd-diversion.patch12
-rw-r--r--packages/nslu2-binary-only/unslung-standard-rootfs_2.3r25.bb12
-rw-r--r--packages/portmap/portmap-unslung_5-7.bb0
29 files changed, 432 insertions, 68 deletions
diff --git a/BitKeeper/etc/logging_ok b/BitKeeper/etc/logging_ok
index 3cc3b0e206..9d685cd955 100644
--- a/BitKeeper/etc/logging_ok
+++ b/BitKeeper/etc/logging_ok
@@ -101,6 +101,7 @@ themel@sophokles.home.themel.com
tigrux@172.16.1.34
timh@host10.kano.org.uk
timh@smallshiny.kano.org.uk
+unslung@builds.(none)
wind@spiritship.(none)
xf005570@cn014xf005570l1.(none)
xf005570@cn014xf005570w1.
diff --git a/conf/distro/switchbox.conf b/conf/distro/switchbox.conf
index 6c378d059f..90c8baefe4 100644
--- a/conf/distro/switchbox.conf
+++ b/conf/distro/switchbox.conf
@@ -3,7 +3,7 @@
#@DESCRIPTION: SwitchBox Linux Distribution for the NSLU2
TARGET_FPU ?= "soft"
-TARGET_OS ?= "linux-uclibc"
+TARGET_OS = "linux-uclibc"
INHERIT += " package_ipk debian"
diff --git a/packages/busybox/switchbox-1.00/defconfig b/packages/busybox/switchbox-1.00/defconfig
index d2587d30ce..40f6b415e5 100644
--- a/packages/busybox/switchbox-1.00/defconfig
+++ b/packages/busybox/switchbox-1.00/defconfig
@@ -63,7 +63,7 @@ CONFIG_CAT=y
CONFIG_CHROOT=y
# CONFIG_CMP is not set
CONFIG_CP=y
-# CONFIG_CUT is not set
+CONFIG_CUT=y
# CONFIG_DATE is not set
CONFIG_DD=y
CONFIG_DF=y
diff --git a/packages/busybox/switchbox-1.00/linuxrc b/packages/busybox/switchbox-1.00/linuxrc
index cd49b16ccf..ef97ba11f6 100644
--- a/packages/busybox/switchbox-1.00/linuxrc
+++ b/packages/busybox/switchbox-1.00/linuxrc
@@ -1,73 +1,182 @@
#!/bin/sh
mounted=
+runboot=
+prefroot=
/bin/mount -t proc proc /proc
-/bin/echo "0x0100" > /proc/sys/kernel/real-root-dev
+# /bin/echo "5" > /proc/sys/kernel/panic
+# /bin/echo "0x0100" > /proc/sys/kernel/real-root-dev
-if [ -z "$mounted" ] && /bin/mount -rt jffs2 /dev/mtdblock4 /mnt/tmpmnt ; then
+sysconflen=`/bin/dd if=/dev/mtd1 bs=4 count=1 | hexdump -n 6 -e '"%02d"'`
+ipaddr=`/bin/dd if=/dev/mtd1 bs=1 count=$sysconflen skip=4 | grep ip_addr | sed -e s/ip_addr=//`
+netmask=`/bin/dd if=/dev/mtd1 bs=1 count=$sysconflen skip=4 | grep netmask | sed -e s/netmask=//`
+gateway=`/bin/dd if=/dev/mtd1 bs=1 count=$sysconflen skip=4 | grep gateway | sed -e s/gateway=//`
+nfsrootloc=`/bin/dd if=/dev/mtd1 bs=1 count=$sysconflen skip=4 | grep nfsroot | sed -e s/nfsroot=// | cut -d, -f 1`
+nfsrootopts=`/bin/dd if=/dev/mtd1 bs=1 count=$sysconflen skip=4 | grep nfsroot | sed -e s/nfsroot=// | cut -d, -f 2- | sed -e s/\"//g`
+device=/dev/`/bin/sed -n -e 's/^\(mtd[0-9]*\): .* "FIS directory"/\1/p' /proc/mtd`
+length=`/bin/dd if=$device bs=2 skip=2048 | /bin/hexdump -n 4 -e '4/1 "%02X"' $device`
- if [ -x /mnt/tmpmnt/sbin/init -o -L /mnt/tmpmnt/sbin/init -o -x /mnt/tmpmnt/bin/init -o -L /mnt/tmpmnt/bin/init ] ; then
- if [ -f /mnt/tmpmnt/.recovery ] ; then
+# Determine desired rootfs
+if [ -z "$mounted" ] && /bin/mount -rt jffs2 /dev/mtdblock4 /mnt/jffs2 ; then
+ if [ -f /mnt/jffs2/.recovery ] ; then
+ /bin/echo "Preferred root device is /dev/ram0 (recovery)"
+ mounted=
+ runboot=
+ prefroot=
+ elif [ -f /mnt/jffs2/.sda2root ] ; then
+ /bin/echo "Preferred root device is /dev/sda2 (disk 1)"
+ mounted=/mnt/newroot
+ runboot=/bin/init
+ prefroot=sda2
+ elif [ -f /mnt/jffs2/.sdb2root ] ; then
+ /bin/echo "Preferred root device is /dev/sdb2 (disk 2)"
+ mounted=/mnt/newroot
+ runboot=/bin/init
+ prefroot=sdb2
+ elif [ -f /mnt/jffs2/.ramdisk ] ; then
+ /bin/echo "Preferred root device is /dev/ram1 (maintenence)"
+ mounted=/mnt/newroot
+ runboot=/bin/init
+ prefroot=maintenence
+ elif [ -f /mnt/jffs2/.nfsroot ] ; then
+ /bin/echo "Preferred root device is through NFS"
+ mounted=/mnt/newroot
+ runboot=/linuxrc
+ prefroot=nfsroot
+ else
+ /bin/echo "Preferred root device is jffs2"
+ mounted=/mnt/jffs2
+ runboot=/linuxrc
+ prefroot=jffs2
+ fi
+fi
+
+# perform prepatory tasks
+if [ -n "$prefroot" ] ; then
+
+ if [ $prefroot = "sda2" -o $prefroot = "sdb2" ] ; then
+ /bin/echo "Sleeping 10sec while waiting for disk..."
+ sleep 10
+ /bin/mount -rt ext3 /dev/$prefroot /mnt/newroot
+ if [ -x /mnt/newroot/bin/init ] && [ -r /mnt/newroot/.unslung ] ; then
+ /bin/echo "Root filesystem will be mounted from /dev/$prefroot ..."
+ else
+ /bin/echo "Cant find valid rootfs on /dev/$prefroot, using recovery ..."
+ mounted=
+ runboot=
+ fi
+
+ elif [ $prefroot = "maintenence" ] ; then
+ /bin/dd if=/dev/zero of=/dev/ram1 bs=1k count=12k
+ /bin/mkdir /lib
+ /bin/ln -s /mnt/jffs2/lib/* /lib
+ /bin/mkdir /usr/bin
+ /bin/ln -s /mnt/jffs2/usr/bin/mke2fs /usr/bin
+ /bin/ln -s /mnt/jffs2/usr/bin/find /usr/bin
+ /bin/ln -s /mnt/jffs2/usr/bin/cpio /usr/bin
+ /usr/bin/mke2fs -m 0 /dev/ram1 12288
+ /bin/mount -t ext2 /dev/ram1 /mnt/newroot
+ ( cd /mnt/jffs2 ; /usr/bin/find . -print0 -mount | /usr/bin/cpio -p -0 -d -m -u /mnt/newroot )
+ if [ -x /mnt/newroot/bin/init ] && [ -r /mnt/newroot/.unslung ] ; then
+ /bin/cp /mnt/newroot/home/httpd/html/Management/upgrade.cgi /mnt/newroot/home/httpd/html/Management/upgrade-real.cgi
+ /bin/echo "#!/bin/sh" > /mnt/newroot/home/httpd/html/Management/upgrade.cgi
+ /bin/echo >> /mnt/newroot/home/httpd/html/Management/upgrade.cgi
+ /bin/echo "/bin/mount -t ramfs none /upload -o size=8196 2>/dev/null" \
+ >> /mnt/newroot/home/httpd/html/Management/upgrade.cgi
+ /bin/echo "/bin/dd if=/dev/zero of=/upload/free-ram bs=1k count=8k 2>/dev/null" \
+ >> /mnt/newroot/home/httpd/html/Management/upgrade.cgi
+ /bin/echo "/bin/umount /upload 2>/dev/null" \
+ >> /mnt/newroot/home/httpd/html/Management/upgrade.cgi
+ /bin/echo "exec /home/httpd/html/Management/upgrade-real.cgi" \
+ >> /mnt/newroot/home/httpd/html/Management/upgrade.cgi
+ /bin/echo "Root filesystem will be mounted from /dev/ram1 (a copy of /dev/mtdblock4) ..."
+ else
+ /bin/echo "Cant find valid rootfs on ram1, using recovery ..."
mounted=
- elif [ -f /mnt/tmpmnt/.ramdisk ] ; then
- /bin/dd if=/dev/zero of=/dev/ram1 bs=1k count=12k
- /bin/mkdir /lib
- /bin/ln -s /mnt/tmpmnt/lib/* /lib
- /bin/mkdir /usr/bin
- /bin/ln -s /mnt/tmpmnt/usr/bin/mke2fs /usr/bin
- /bin/ln -s /mnt/tmpmnt/usr/bin/find /usr/bin
- /bin/ln -s /mnt/tmpmnt/usr/bin/cpio /usr/bin
- /usr/bin/mke2fs -m 0 /dev/ram1 12288
- /bin/mount -t ext2 /dev/ram1 /mnt/repair
- ( cd /mnt/tmpmnt ; /usr/bin/find . -print0 -mount | /usr/bin/cpio -p -0 -d -m -u /mnt/repair )
- /bin/cp /mnt/repair/home/httpd/html/Management/upgrade.cgi /mnt/repair/home/httpd/html/Management/upgrade-real.cgi
- /bin/echo "#!/bin/sh" > /mnt/repair/home/httpd/html/Management/upgrade.cgi
- /bin/echo >> /mnt/repair/home/httpd/html/Management/upgrade.cgi
- /bin/echo "/bin/mount -t ramfs none /upload -o size=8196 2>/dev/null" \
- >> /mnt/repair/home/httpd/html/Management/upgrade.cgi
- /bin/echo "/bin/dd if=/dev/zero of=/upload/free-ram bs=1k count=8k 2>/dev/null" \
- >> /mnt/repair/home/httpd/html/Management/upgrade.cgi
- /bin/echo "/bin/umount /upload 2>/dev/null" \
- >> /mnt/repair/home/httpd/html/Management/upgrade.cgi
- /bin/echo "exec /home/httpd/html/Management/upgrade-real.cgi" \
- >> /mnt/repair/home/httpd/html/Management/upgrade.cgi
- /bin/umount /mnt/repair
- /bin/echo "Root filesystem will be mounted from /dev/ram1 (a copy of /dev/mtdblock4) ..."
- /bin/echo "0x0101" > /proc/sys/kernel/real-root-dev
- mounted=/mnt/tmpmnt
+ runboot=
+ fi
+
+ elif [ $prefroot = "nfsroot" ] ; then
+
+ # Should the network drivers come from payload or the jffs2?
+ if ( [ "$length" != "FFFFFFFF" ] ); then
+ /bin/dd if=$device bs=2 skip=2056 | /bin/tar zxvf -
+ /sbin/insmod ixp400
+ /sbin/insmod ixp425_eth
+ /sbin/ifconfig ixp0 up $ipaddr netmask $netmask
+ /sbin/route add default gw $gateway
+ fi
+
+ /bin/mkdir -p /lib
+ /bin/ln -s /mnt/jffs2/lib/* /lib
+ /bin/mkdir -p /sbin
+ /bin/ln -s /mnt/jffs2/sbin/portmap /sbin
+
+ /sbin/ifconfig lo up 127.0.0.1
+ /sbin/portmap
+
+ . /mnt/jffs2/.nfsroot
+
+ mount -o $nfsrootopts $nfsrootloc /mnt/newroot
+
+ if [ -e /mnt/newroot/sbin/init -o -e /mnt/newroot/bin/init ] ; then
+ /bin/echo "Root filesystem will be mounted from a NFS root ..."
+ mounted=/mnt/newroot
+ runboot=/linuxrc
else
+ /bin/echo "Cant find valid NFS rootfs, using recovery ..."
+ mounted=
+ runboot=
+ fi
+
+ else
+ if [ -e /mnt/jffs2/sbin/init -o -e /mnt/jffs2/bin/init ] ; then
/bin/echo "Root filesystem will be mounted from /dev/mtdblock4 ..."
- /bin/echo "0x1f04" > /proc/sys/kernel/real-root-dev
- mounted=/mnt/tmpmnt
+ mounted=/mnt/jffs2
+ runboot=/linuxrc
+ else
+ /bin/echo "Cant find valid rootfs on jffs2, using recovery ..."
+ mounted=
+ runboot=
fi
fi
-
- /bin/umount /mnt/tmpmnt
fi
-if [ -z "$mounted" ] ; then
-
- if [ -e /mnt/tmpmnt/sbin/init -o -e /mnt/tmpmnt/bin/init ] ; then
- /bin/echo "Root filesystem will be mounted from /dev/ram0 ..."
- mounted=/mnt/tmpmnt
- /bin/echo "0x0100" > /proc/sys/kernel/real-root-dev
+# Pivot
+if [ -n "$mounted" ] ; then
+ /bin/killall portmap
+ if [ $mounted != "/mnt/jffs2" ] ; then
+ sleep 1
+ /bin/umount /mnt/jffs2
fi
+# /bin/echo "5" > /proc/sys/kernel/panic
+ umount /proc
+ cd $mounted
+ /sbin/pivot_root . initrd
+ exec chroot . $runboot < dev/console > dev/console 2>&1
fi
+#if [ -z "$mounted" ] ; then
+#
+# /bin/umount /mnt/jffs2
+# if [ -e /mnt/jffs2/sbin/init -o -e /mnt/jffs2/bin/init ] ; then
+# /bin/echo "5" > /proc/sys/kernel/panic
+# /bin/echo "Root filesystem will be mounted from /dev/ram0 ..."
+# /bin/echo "0x0100" > /proc/sys/kernel/real-root-dev
+# fi
+#fi
+
if [ -z "$mounted" ] ; then
/bin/echo "Root filesystem cannot be found - dropping into shell ..."
- /bin/echo "5" > /proc/sys/kernel/panic
-
- device=/dev/`/bin/sed -n -e 's/^\(mtd[0-9]*\): .* "FIS directory"/\1/p' /proc/mtd`
- length=`/bin/dd if=$device bs=2 skip=2048 | /bin/hexdump -n 4 -e '4/1 "%02X"' $device`
+# /bin/echo "5" > /proc/sys/kernel/panic
if ( [ "$length" != "FFFFFFFF" ] ); then
/bin/dd if=$device bs=2 skip=2056 | /bin/tar zxvf -
/sbin/insmod ixp400
/sbin/insmod ixp425_eth
- /sbin/ifconfig ixp0 up 192.168.1.77 netmask 255.255.0.0
+ /sbin/ifconfig ixp0 up $ipaddr netmask $netmask
/sbin/telnetd
fi
diff --git a/packages/busybox/switchbox_1.00.bb b/packages/busybox/switchbox_1.00.bb
index 3e86966411..cc6247ed25 100644
--- a/packages/busybox/switchbox_1.00.bb
+++ b/packages/busybox/switchbox_1.00.bb
@@ -46,5 +46,5 @@ do_compile () {
do_install () {
oe_runmake 'PREFIX=${D}' install
install -m 0755 ${WORKDIR}/linuxrc ${D}/
- mkdir -p ${D}/proc ${D}/mnt/tmpmnt ${D}/mnt/repair
+ mkdir -p ${D}/proc ${D}/mnt/jffs2 ${D}/mnt/repair ${D}/mnt/newroot
}
diff --git a/packages/linux/unslung-standard-kernel_2.3r25.bb b/packages/linux/unslung-standard-kernel_2.3r25.bb
index eaf5f0cfbd..0645f82111 100644
--- a/packages/linux/unslung-standard-kernel_2.3r25.bb
+++ b/packages/linux/unslung-standard-kernel_2.3r25.bb
@@ -4,12 +4,12 @@ include nslu2-linksys-kernel_2.4.22.bb
DESCRIPTION = "Unslung kernel for the Linksys NSLU2 device"
MAINTAINER = "NSLU2 Linux <www.nlsu2-linux.org>"
-PR = "r7"
+PR = "r8"
UNSLUNG_VARIANT ?= "standard"
KERNEL_SUFFIX = "unslung-${UNSLUNG_VARIANT}"
-CMDLINE_ROOT = "root=/dev/slug initrd=0x01000000,10M mem=32M@0x00000000"
+CMDLINE_ROOT = "root=/dev/ram0 rw init=/linuxrc initrd=0x01000000,10M mem=32M@0x00000000"
UNSLUNG_KERNEL_EXTRA_SRC_URI ?=
diff --git a/packages/meta/unslung-standard-image.bb b/packages/meta/unslung-standard-image.bb
index ab665cf6f8..413a51037f 100644
--- a/packages/meta/unslung-standard-image.bb
+++ b/packages/meta/unslung-standard-image.bb
@@ -3,8 +3,8 @@ PR = "r3"
IMAGE_LINGUAS = ""
USE_DEVFS = "1"
-UNSLUNG_BASE_DEPENDS = "glibc slingbox ipkg wget cpio findutils"
-UNSLUNG_BASE_PACKAGES = "libc6-unslung slingbox ipkg wget cpio findutils"
+UNSLUNG_BASE_DEPENDS = "glibc slingbox ipkg wget cpio findutils portmap-unslung"
+UNSLUNG_BASE_PACKAGES = "libc6-unslung slingbox ipkg wget cpio findutils portmap-unslung"
IMAGE_VARIANT ?= "standard"
diff --git a/packages/nslu2-binary-only/nslu2-switchbox-firmware.bb b/packages/nslu2-binary-only/nslu2-switchbox-firmware.bb
index 292271a7c5..0ed74e207a 100644
--- a/packages/nslu2-binary-only/nslu2-switchbox-firmware.bb
+++ b/packages/nslu2-binary-only/nslu2-switchbox-firmware.bb
@@ -2,9 +2,9 @@ SECTION = "base"
DEPENDS = ""
PACKAGES = ""
INHIBIT_DEFAULT_DEPS = "1"
-PR = "r10"
+PR = "r15"
-SRC_URI = "http://nslu.sf.net/downloads/switchbox-3.9.tar.gz"
+SRC_URI = "http://nslu.sf.net/downloads/switchbox-4.7.tar.gz"
S = "${WORKDIR}"
python () {
diff --git a/packages/nslu2-binary-only/unslung-rootfs-2.3r25/linuxrc b/packages/nslu2-binary-only/unslung-rootfs-2.3r25/linuxrc
index e69de29bb2..5a18a0540c 100644
--- a/packages/nslu2-binary-only/unslung-rootfs-2.3r25/linuxrc
+++ b/packages/nslu2-binary-only/unslung-rootfs-2.3r25/linuxrc
@@ -0,0 +1,57 @@
+#!/bin/sh
+
+if [ -f /.useportmap ] ; then
+ /sbin/portmap
+fi
+# /bin/umount /initrd
+
+/bin/echo "Firmware Version: `/bin/cat /.unslung`"
+/bin/mount -t proc proc /proc
+/bin/echo "5" > /proc/sys/kernel/panic
+/bin/sleep 1
+
+#mounted=
+#
+#/bin/echo "0x1f04" > /proc/sys/kernel/real-root-dev
+#
+#/bin/umount /mnt/tmpmnt/proc
+#/bin/umount /mnt/tmpmnt
+#
+#/bin/sleep 10
+#
+#if [ -z "$mounted" ] && /bin/mount -rt ext3 /dev/sda2 /mnt/tmpmnt ; then
+#
+# if [ -x /mnt/tmpmnt/bin/init ] &&
+# [ -d /mnt/tmpmnt/unslung ] && [ -r /mnt/tmpmnt/.unslung ] &&
+# [ "`/bin/cat /.unslung`" = "`/bin/cat /mnt/tmpmnt/.unslung`" ] ; then
+# /bin/echo "Root filesystem will be mounted from /dev/sda2 ..."
+# mounted=/mnt/tmpmnt
+# /bin/echo "0x0802" > /proc/sys/kernel/real-root-dev
+# [ -r $mounted/unslung/rc.linuxrc ] && . $mounted/unslung/rc.linuxrc
+# fi
+#
+# /bin/umount /mnt/tmpmnt
+#fi
+#
+#if [ -z "$mounted" ] && /bin/mount -rt ext3 /dev/sdb2 /mnt/tmpmnt ; then
+#
+# if [ -x /mnt/tmpmnt/bin/init ] &&
+# [ -d /mnt/tmpmnt/unslung ] && [ -r /mnt/tmpmnt/.unslung ] &&
+# [ "`/bin/cat /.unslung`" = "`/bin/cat /mnt/tmpmnt/.unslung`" ] ; then
+# /bin/echo "Root filesystem will be mounted from /dev/sdb2 ..."
+# mounted=/mnt/tmpmnt
+# /bin/echo "0x0812" > /proc/sys/kernel/real-root-dev
+# [ -r $mounted/unslung/rc.linuxrc ] && . $mounted/unslung/rc.linuxrc
+# fi
+#
+# /bin/umount /mnt/tmpmnt
+#fi
+#
+#if [ -z "$mounted" ] ; then
+# /bin/echo "Root filesystem will be mounted from /dev/ram0 ..."
+#fi
+#
+/bin/umount /proc
+
+exec /bin/init
+exit 0
diff --git a/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc-diversion.patch b/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc-diversion.patch
index 7ab6bbf566..cfdbb0b7b4 100644
--- a/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc-diversion.patch
+++ b/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc-diversion.patch
@@ -14,6 +14,11 @@
+ ( cd /home/httpd/html/Management ; mv upgrade-maint.htm upgrade.htm )
+fi
+
++#if ( [ -f /.sda2root ] || [ -f /.sdb2root ] ) ; then
++# echo "Root filesystem is running a external disk ..."
++# ( cd /home/httpd/html/Management ; mv upgrade-maint.htm upgrade.htm )
++#fi
++
+# Wait for the USB disks to be recognised.
+sleep 5
+
diff --git a/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.1-diversion.patch b/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.1-diversion.patch
index 6dd4ca97d3..b0b9ad5dba 100644
--- a/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.1-diversion.patch
+++ b/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.1-diversion.patch
@@ -3,8 +3,8 @@
@@ -1,5 +1,17 @@
#!/bin/sh
-+if ( [ -f /mnt/sda2/unslung/rc.1 ] && . /mnt/sda2/unslung/rc.1 ) ; then return 0 ; fi
-+if ( [ -f /mnt/sdb2/unslung/rc.1 ] && . /mnt/sdb2/unslung/rc.1 ) ; then return 0 ; fi
++if ( [ ! -f /.sda2root ] && [ -f /mnt/sda2/unslung/rc.1 ] && . /mnt/sda2/unslung/rc.1 ) ; then return 0 ; fi
++if ( [ ! -f /.sdb2root ] && [ -f /mnt/sdb2/unslung/rc.1 ] && . /mnt/sdb2/unslung/rc.1 ) ; then return 0 ; fi
+if ( [ -f /unslung/rc.1 ] && . /unslung/rc.1 ) ; then return 0 ; fi
+
+if ( [ -f /proc/hd_conn ] ) ; then
diff --git a/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.crond-diversion.patch b/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.crond-diversion.patch
index e69de29bb2..6c7327c199 100644
--- a/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.crond-diversion.patch
+++ b/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.crond-diversion.patch
@@ -0,0 +1,12 @@
+--- 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,9 @@
+ #!/bin/sh
+
++if ( [ ! -f /.sda2root ] && [ -r /mnt/sda2/unslung/rc.crond ] && . /mnt/sda2/unslung/rc.crond ) ; then return 0 ; fi
++if ( [ ! -f /.sdb2root ] && [ -r /mnt/sdb2/unslung/rc.crond ] && . /mnt/sdb2/unslung/rc.crond ) ; then return 0 ; fi
++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-2.3r25/rc.halt-diversion.patch b/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.halt-diversion.patch
index ddb501e55e..163586314e 100644
--- a/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.halt-diversion.patch
+++ b/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.halt-diversion.patch
@@ -3,8 +3,8 @@
@@ -1,4 +1,11 @@
#!/bin/sh
+
-+if ( [ -r /mnt/sda2/unslung/rc.halt ] && . /mnt/sda2/unslung/rc.halt ) ; then return 0 ; fi
-+if ( [ -r /mnt/sdb2/unslung/rc.halt ] && . /mnt/sdb2/unslung/rc.halt ) ; then return 0 ; fi
++if ( [ ! -f /.sda2root ] && [ -r /mnt/sda2/unslung/rc.halt ] && . /mnt/sda2/unslung/rc.halt ) ; then return 0 ; fi
++if ( [ ! -f /.sdb2root ] && [ -r /mnt/sdb2/unslung/rc.halt ] && . /mnt/sdb2/unslung/rc.halt ) ; then return 0 ; fi
+if ( [ -r /unslung/rc.halt ] && . /unslung/rc.halt ) ; then return 0 ; fi
+
+/bin/echo "Stopping UNSLUNG Packages:"; ( . /etc/rc.d/rc.unslung-stop )
diff --git a/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.local-diversion.patch b/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.local-diversion.patch
index e69de29bb2..3a9474c137 100644
--- a/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.local-diversion.patch
+++ b/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.local-diversion.patch
@@ -0,0 +1,14 @@
+--- 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,11 @@
+ #!/bin/sh
++
+ HOSTNAME=`hostname`
++
++if ( [ ! -f /.sda2root ] && [ -r /mnt/sda2/unslung/rc.local ] && . /mnt/sda2/unslung/rc.local ) ; then return 0 ; fi
++if ( [ ! -f /.sdb2root ] && [ -r /mnt/sdb2/unslung/rc.local ] && . /mnt/sdb2/unslung/rc.local ) ; then return 0 ; fi
++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-2.3r25/rc.modules-diversion.patch b/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.modules-diversion.patch
index e69de29bb2..46a880257b 100644
--- a/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.modules-diversion.patch
+++ b/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.modules-diversion.patch
@@ -0,0 +1,12 @@
+--- 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,9 @@
+ #!/bin/sh
++
++if ( [ ! -f /.sda2root ] && [ -f /mnt/sda2/unslung/rc.modules ] && . /mnt/sda2/unslung/rc.modules ) ; then return 0 ; fi
++if ( [ ! -f /.sdb2root ] && [ -f /mnt/sdb2/unslung/rc.modules ] && . /mnt/sdb2/unslung/rc.modules ) ; then return 0 ; fi
++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-2.3r25/rc.network-diversion.patch b/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.network-diversion.patch
index e69de29bb2..02e7e85b16 100644
--- a/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.network-diversion.patch
+++ b/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.network-diversion.patch
@@ -0,0 +1,11 @@
+--- 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,8 @@
+ #!/bin/sh
++
++if ( [ ! -f /.sda2root ] && [ -f /mnt/sda2/unslung/rc.network ] && . /mnt/sda2/unslung/rc.network ) ; then return 0 ; fi
++if ( [ ! -f /.sdb2root ] && [ -f /mnt/sdb2/unslung/rc.network ] && . /mnt/sdb2/unslung/rc.network ) ; then return 0 ; fi
++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-2.3r25/rc.quickset-diversion.patch b/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.quickset-diversion.patch
index e69de29bb2..6f5de333e8 100644
--- a/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.quickset-diversion.patch
+++ b/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.quickset-diversion.patch
@@ -0,0 +1,11 @@
+--- 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,8 @@
+ #!/bin/sh
++
++if ( [ ! -f /.sda2root ] && [ -f /mnt/sda2/unslung/rc.quickset ] && . /mnt/sda2/unslung/rc.quickset ) ; then return 0 ; fi
++if ( [ ! -f /.sdb2root ] && [ -f /mnt/sdb2/unslung/rc.quickset ] && . /mnt/sdb2/unslung/rc.quickset ) ; then return 0 ; fi
++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-2.3r25/rc.quota-diversion.patch b/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.quota-diversion.patch
index e69de29bb2..bef9686cdc 100644
--- a/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.quota-diversion.patch
+++ b/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.quota-diversion.patch
@@ -0,0 +1,12 @@
+--- 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,9 @@
+ #!/bin/sh
+
++if ( [ ! -f /.sda2root ] && [ -f /mnt/sda2/unslung/rc.quota ] && . /mnt/sda2/unslung/rc.quota ) ; then return 0 ; fi
++if ( [ ! -f /.sdb2root ] && [ -f /mnt/sdb2/unslung/rc.quota ] && . /mnt/sdb2/unslung/rc.quota ) ; then return 0 ; fi
++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-2.3r25/rc.reboot-diversion.patch b/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.reboot-diversion.patch
index 482c4dbb27..1b8bf97fdf 100644
--- a/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.reboot-diversion.patch
+++ b/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.reboot-diversion.patch
@@ -3,8 +3,8 @@
@@ -1,4 +1,11 @@
#!/bin/sh
+
-+if ( [ -r /mnt/sda2/unslung/rc.reboot ] && . /mnt/sda2/unslung/rc.reboot ) ; then return 0 ; fi
-+if ( [ -r /mnt/sdb2/unslung/rc.reboot ] && . /mnt/sdb2/unslung/rc.reboot ) ; then return 0 ; fi
++if ( [ ! -f /.sda2root ] && [ -r /mnt/sda2/unslung/rc.reboot ] && . /mnt/sda2/unslung/rc.reboot ) ; then return 0 ; fi
++if ( [ ! -f /.sdb2root ] && [ -r /mnt/sdb2/unslung/rc.reboot ] && . /mnt/sdb2/unslung/rc.reboot ) ; then return 0 ; fi
+if ( [ -r /unslung/rc.reboot ] && . /unslung/rc.reboot ) ; then return 0 ; fi
+
+/bin/echo "Stopping UNSLUNG Packages:"; ( . /etc/rc.d/rc.unslung-stop )
diff --git a/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.reset_usrgrpshare-diversion.patch b/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.reset_usrgrpshare-diversion.patch
index e69de29bb2..ea5716e69a 100644
--- a/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.reset_usrgrpshare-diversion.patch
+++ b/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.reset_usrgrpshare-diversion.patch
@@ -0,0 +1,10 @@
+--- 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,7 @@
+ #!/bin/sh
++
++if ( [ ! -f /.sda2root ] && [ -f /mnt/sda2/unslung/rc.reset_usrgrpshare ] && . /mnt/sda2/unslung/rc.reset_usrgrpshare ) ; then return 0 ; fi
++if ( [ ! -f /.sdb2root ] && [ -f /mnt/sdb2/unslung/rc.reset_usrgrpshare ] && . /mnt/sdb2/unslung/rc.reset_usrgrpshare ) ; then return 0 ; fi
++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-2.3r25/rc.rstimezone-diversion.patch b/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.rstimezone-diversion.patch
index e69de29bb2..d30e60e6ce 100644
--- a/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.rstimezone-diversion.patch
+++ b/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.rstimezone-diversion.patch
@@ -0,0 +1,12 @@
+--- 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,9 @@
+ #!/bin/sh
++
++if ( [ ! -f /.sda2root ] && [ -f /mnt/sda2/unslung/rc.rstimezone ] && . /mnt/sda2/unslung/rc.rstimezone ) ; then return 0 ; fi
++if ( [ ! -f /.sdb2root ] && [ -f /mnt/sdb2/unslung/rc.rstimezone ] && . /mnt/sdb2/unslung/rc.rstimezone ) ; then return 0 ; fi
++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-2.3r25/rc.samba-diversion.patch b/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.samba-diversion.patch
index e69de29bb2..e28b533636 100644
--- a/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.samba-diversion.patch
+++ b/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.samba-diversion.patch
@@ -0,0 +1,12 @@
+--- 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,9 @@
+ #!/bin/sh
++
++if ( [ ! -f /.sda2root ] && [ -f /mnt/sda2/unslung/rc.samba ] && . /mnt/sda2/unslung/rc.samba ) ; then return 0 ; fi
++if ( [ ! -f /.sdb2root ] && [ -f /mnt/sdb2/unslung/rc.samba ] && . /mnt/sdb2/unslung/rc.samba ) ; then return 0 ; fi
++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-2.3r25/rc.sysinit-diversion.patch b/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.sysinit-diversion.patch
index e4b0499361..e899fca1e4 100644
--- a/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.sysinit-diversion.patch
+++ b/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.sysinit-diversion.patch
@@ -8,8 +8,8 @@
. /etc/rc.d/rc.functions
. /etc/sysconfig/network
+
-+if ( [ -f /mnt/sda2/unslung/rc.sysinit ] && . /mnt/sda2/unslung/rc.sysinit ) ; then return 0 ; fi
-+if ( [ -f /mnt/sdb2/unslung/rc.sysinit ] && . /mnt/sdb2/unslung/rc.sysinit ) ; then return 0 ; fi
++if ( [ ! -f /.sda2root ] && [ -f /mnt/sda2/unslung/rc.sysinit ] && . /mnt/sda2/unslung/rc.sysinit ) ; then return 0 ; fi
++if ( [ ! -f /.sdb2root ] && [ -f /mnt/sdb2/unslung/rc.sysinit ] && . /mnt/sdb2/unslung/rc.sysinit ) ; then return 0 ; fi
+if ( [ -f /unslung/rc.sysinit ] && . /unslung/rc.sysinit ) ; then return 0 ; fi
+
mkdir -p /var/lock/samba >/dev/null
diff --git a/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.thttpd-diversion.patch b/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.thttpd-diversion.patch
index e69de29bb2..a360fa4f6b 100644
--- a/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.thttpd-diversion.patch
+++ b/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.thttpd-diversion.patch
@@ -0,0 +1,12 @@
+--- 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,9 @@
+ #!/bin/sh
++
++if ( [ ! -f /.sda2root ] && [ -f /mnt/sda2/unslung/rc.thttpd ] && . /mnt/sda2/unslung/rc.thttpd ) ; then return 0 ; fi
++if ( [ ! -f /.sdb2root ] && [ -f /mnt/sdb2/unslung/rc.thttpd ] && . /mnt/sdb2/unslung/rc.thttpd ) ; then return 0 ; fi
++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-2.3r25/rc.unslung-start b/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.unslung-start
index e69de29bb2..1e6dbb5559 100644
--- a/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.unslung-start
+++ b/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.unslung-start
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+if ( [ ! -f /.sda2root ] && [ -f /mnt/sda2/unslung/rc.unslung-start ] && . /mnt/sda2/unslung/rc.unslung-start ) ; then return 0 ; fi
+if ( [ ! -f /.sdb2root ] && [ -f /mnt/sdb2/unslung/rc.unslung-start ] && . /mnt/sdb2/unslung/rc.unslung-start ) ; then return 0 ; fi
+if ( [ -f /unslung/rc.unslung-start ] && . /unslung/rc.unslung-start ) ; then return 0 ; fi
+# For backwards compatibility, will be removed in Unslung 4.x
+if ( [ -f /mnt/sda2/unslung/rc.unslung ] && . /mnt/sda2/unslung/rc.unslung ) ; then return 0 ; fi
+if ( [ -f /mnt/sdb2/unslung/rc.unslung ] && . /mnt/sdb2/unslung/rc.unslung ) ; then return 0 ; fi
+if ( [ -f /unslung/rc.unslung ] && . /unslung/rc.unslung ) ; 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-2.3r25/rc.unslung-stop b/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.unslung-stop
index e69de29bb2..be0070198d 100644
--- a/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.unslung-stop
+++ b/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.unslung-stop
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+if ( [ ! -f /.sda2root ] && [ -f /mnt/sda2/unslung/rc.unslung-stop ] && . /mnt/sda2/unslung/rc.unslung-stop ) ; then return 0 ; fi
+if ( [ ! -f /.sdb2root ] && [ -f /mnt/sdb2/unslung/rc.unslung-stop ] && . /mnt/sdb2/unslung/rc.unslung-stop ) ; then return 0 ; fi
+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-2.3r25/rc.xinetd-diversion.patch b/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.xinetd-diversion.patch
index e69de29bb2..f9c8c62482 100644
--- a/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.xinetd-diversion.patch
+++ b/packages/nslu2-binary-only/unslung-rootfs-2.3r25/rc.xinetd-diversion.patch
@@ -0,0 +1,12 @@
+--- 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,9 @@
+ #!/bin/sh
++
++if ( [ ! -f /.sda2root ] && [ -f /mnt/sda2/unslung/rc.xinetd ] && . /mnt/sda2/unslung/rc.xinetd ) ; then return 0 ; fi
++if ( [ ! -f /.sdb2root ] && [ -f /mnt/sdb2/unslung/rc.xinetd ] && . /mnt/sdb2/unslung/rc.xinetd ) ; then return 0 ; fi
++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-standard-rootfs_2.3r25.bb b/packages/nslu2-binary-only/unslung-standard-rootfs_2.3r25.bb
index cec0b3740c..e5d16d3f12 100644
--- a/packages/nslu2-binary-only/unslung-standard-rootfs_2.3r25.bb
+++ b/packages/nslu2-binary-only/unslung-standard-rootfs_2.3r25.bb
@@ -1,8 +1,8 @@
SECTION = "base"
-PR = "r41"
+PR = "r40"
-UNSLUNG_VERSION = "3.18-beta"
+UNSLUNG_VERSION = "4.1-alpha"
UNSLUNG_VARIANT ?= "standard"
DEPENDS = "nslu2-linksys-libs"
@@ -11,7 +11,6 @@ FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/unslung-rootfs-${PV}/${UNS
SRC_URI = "http://nslu.sf.net/downloads/nslu2-linksys-ramdisk-2.3r25.tar.bz2 \
file://README \
- file://NOTES \
file://linuxrc \
file://unsling \
file://resling \
@@ -38,7 +37,6 @@ SRC_URI = "http://nslu.sf.net/downloads/nslu2-linksys-ramdisk-2.3r25.tar.bz2 \
file://remount-noatime.patch;patch=1 \
file://initialise-mtab.patch;patch=1 \
file://mount_usbdevfs.patch;patch=1 \
- file://tmp-permissions.patch;patch=1 \
file://maintmode.cgi file://upgrade-maint.htm file://upgrade-nomaint.htm \
"
@@ -63,6 +61,8 @@ do_compile () {
rm -f ${S}/etc/rc.orig
rm -f ${S}/etc/rc.d/rc.1.orig
+ install -d ${S}/initrd
+
install -m 755 ${WORKDIR}/linuxrc ${S}/linuxrc
install -m 755 ${WORKDIR}/unsling ${S}/sbin/unsling
install -m 755 ${WORKDIR}/resling ${S}/sbin/resling
@@ -71,7 +71,6 @@ do_compile () {
install -d ${S}/opt/doc
install -m 755 ${WORKDIR}/README ${S}/opt/doc/README
- install -m 755 ${WORKDIR}/NOTES ${S}/opt/doc/NOTES
ln -s /opt/doc ${S}/home/httpd/html/Unslung
# Remove the libraries, because they are in nslu2-linksys-libs now
@@ -89,10 +88,11 @@ do_compile () {
sed -i -e s/@ds_sw_version#/@ds_sw_version#-uNSLUng-${UNSLUNG_VARIANT}-${UNSLUNG_VERSION}/ \
${S}/home/httpd/html/Management/upgrade.htm
+ echo > ${S}/.recovery
}
do_install () {
- ( cd ${S} ; tar -c -v -f - --exclude '.pc' --exclude 'patches' . ) | ( cd ${D} ; tar xvf - )
+ ( cd ${S} ; tar -c -v -f - --exclude '.pc' . ) | ( cd ${D} ; tar xvf - )
}
PACKAGES = "${PN}"
diff --git a/packages/portmap/portmap-unslung_5-7.bb b/packages/portmap/portmap-unslung_5-7.bb
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/portmap/portmap-unslung_5-7.bb