summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorRod Whitby <rod@whitby.id.au>2005-06-10 15:37:26 +0000
committerRod Whitby <rod@whitby.id.au>2005-06-10 15:37:26 +0000
commitad68fd1b19ecba85e2b75560ad46d7690a9e8bb7 (patch)
treeaee712b82939ee181552973c214ac1e5e93d391b /packages
parenta1d10d68211fc3acbef83376a70253fc534adecb (diff)
Merge bk://nslu2-linux@nslu2-linux.bkbits.net/openembedded
into home.(none):/home/bitkeeper/openembedded 2005/06/11 01:06:53+09:30 (none)!rwhitby Unslung 5.2-alpha: Removed the ipkg symlink on the jffs2 partition, and made unsling put it back again on the external disk BKrev: 42a9b3b6Hk58_QfPj1VvLcn3OHJ5Iw
Diffstat (limited to 'packages')
-rw-r--r--packages/meta/unslung-image.bb4
-rw-r--r--packages/nslu2-binary-only/unslung-rootfs/NOTES8
-rw-r--r--packages/nslu2-binary-only/unslung-rootfs/unsling153
-rw-r--r--packages/nslu2-binary-only/unslung-rootfs_2.3r29.bb2
4 files changed, 163 insertions, 4 deletions
diff --git a/packages/meta/unslung-image.bb b/packages/meta/unslung-image.bb
index 0974f4e1f2..a6277afcf7 100644
--- a/packages/meta/unslung-image.bb
+++ b/packages/meta/unslung-image.bb
@@ -1,5 +1,5 @@
LICENSE = MIT
-PR = "r5"
+PR = "r6"
IMAGE_BASENAME = "unslung"
@@ -31,6 +31,8 @@ unslung_clean_image () {
rm -f ${IMAGE_ROOTFS}/${sysconfdir}/version
# Tidy up some thing which are in the wrong place
mv ${IMAGE_ROOTFS}${libdir}/libipkg* ${IMAGE_ROOTFS}/lib/
+ # Remove the ipkg symlink - unsling puts it back in
+ rm -f ${IMAGE_ROOTFS}${bindir}/ipkg
# Hack out the modutils stuff - it's too hard to make it work
rm -f ${IMAGE_ROOTFS}${libdir}/ipkg/info/update-modules.postinst
rm -rf ${IMAGE_ROOTFS}/etc/rcS.d
diff --git a/packages/nslu2-binary-only/unslung-rootfs/NOTES b/packages/nslu2-binary-only/unslung-rootfs/NOTES
index 9f110f8fe2..da2601acaf 100644
--- a/packages/nslu2-binary-only/unslung-rootfs/NOTES
+++ b/packages/nslu2-binary-only/unslung-rootfs/NOTES
@@ -423,7 +423,11 @@ and about 1MB of RAM.
First public release of 4.x firmware.
-4.21:
+5.1:
Upgraded to Linksys firmware V2.3R29, but kept telnetd.
-Fixed maintenance mode.
+
+5.2:
+
+Removed the ipkg link, and made unsling put it back on an external disk.
+
diff --git a/packages/nslu2-binary-only/unslung-rootfs/unsling b/packages/nslu2-binary-only/unslung-rootfs/unsling
index e69de29bb2..6e5a5ef8c3 100644
--- a/packages/nslu2-binary-only/unslung-rootfs/unsling
+++ b/packages/nslu2-binary-only/unslung-rootfs/unsling
@@ -0,0 +1,153 @@
+#!/bin/sh
+
+usage="Usage: $0 disk1|disk2"
+
+# Set target disk
+
+if [ $# -gt 1 ] ; then
+ echo $usage
+ exit 1
+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
+ fi
+else
+ echo $usage
+ exit 1
+fi
+
+# Check it's a real mount point
+
+if grep $targ /proc/mounts >/dev/null 2>&1 ; then
+ echo "Target disk is $targ"
+else
+ echo "Error: $targ is not a mounted disk"
+ exit 1
+fi
+
+# Start at the root directory
+
+cd /
+
+if [ -z "$copy" ] ; then
+
+ # 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
+ mv $targ/usr/lib/ipkg $targ/usr/lib/ipkg.old
+ fi
+
+ # 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
+
+ # Copy over the existing ipkg database.
+
+ 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
+
+ # Create the boot flag file.
+
+ rm -f /.sd??root $targ/.sd??root /.ramdisk $targ/.ramdisk
+
+ echo "Creating /$flag to direct switchbox to boot from $targ."
+ echo > /$flag
+ echo > $targ/$flag
+
+fi
+
+exit 0
diff --git a/packages/nslu2-binary-only/unslung-rootfs_2.3r29.bb b/packages/nslu2-binary-only/unslung-rootfs_2.3r29.bb
index 88d060617f..84457973d7 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 = "r2"
+PR = "r3"
DEPENDS = "nslu2-linksys-libs"