summaryrefslogtreecommitdiff
path: root/nslu2-binary-only/nslu2-unslung-ramdisk
diff options
context:
space:
mode:
authorChris Larson <clarson@kergoth.com>2004-11-02 23:16:15 +0000
committerChris Larson <clarson@kergoth.com>2004-11-02 23:16:15 +0000
commitb480099179a200a86cf2b4e46941c005f44c2435 (patch)
tree15bde0e698d631d3500614c440a707a4e5095a3e /nslu2-binary-only/nslu2-unslung-ramdisk
parenta33bce4e136edcfb8143ff467b484c3b16727ed9 (diff)
Merge openembedded@openembedded.bkbits.net:packages-devel
into handhelds.org:/home/kergoth/code/packages 2004/11/02 17:15:23-06:00 handhelds.org!kergoth Upgrade udev to 042, kill old versions to reduce maintainance headaches. 2004/11/02 16:46:24-06:00 handhelds.org!kergoth Merge http://nslu2-linux.bkbits.net/packages into handhelds.org:/home/kergoth/code/packages 2004/11/03 09:48:56+11:00 black.lan!peteru Merge nslu2-linux@nslu2-linux.bkbits.net:packages into black.lan:/home/slug/bk/packages 2004/11/03 09:36:32+11:00 black.lan!peteru kernel, ramdisk and image variants. Currently ramdisk variants are broken. Pushing anyway, so that OE experts can help with fixing the issue. 2004/10/31 13:48:09-10:00 (none)!dereky defconfig: Add raid lines 2004/11/01 09:26:07+10:30 (none)!rwhitby Added the -able image to Unslung 2004/11/01 01:37:33+11:00 black.lan!peteru Create a new image for unslung-able. 2004/10/31 10:33:14+10:30 (none)!rwhitby Merge bk://nslu2-linux@nslu2-linux.bkbits.net/packages into home.(none):/home/openembedded/packages 2004/10/31 10:31:48+10:30 (none)!rwhitby Added slingbox to Unslung image 2004/10/31 10:25:02+10:30 (none)!rwhitby Added slingbox to Unslung image 2004/10/30 16:34:07-04:00 rant-central.com!CodeWhacker Merge bk://nslu2-linux.bkbits.net/packages into rant-central.com:/home/roy/workspace/NSLU2/oe/packages 2004/10/30 16:29:33-04:00 rant-central.com!CodeWhacker Rearrange tar args in ipkg-build to avoid the error messages some tar versions produce when there are args after the source files list. 2004/10/29 11:18:45+09:30 (none)!rwhitby Unslung: Make sure that /root exists after unslinging. 2004/10/29 09:54:54+09:30 (none)!rwhitby Unslung: Fixed the unsling script so it removes conflicting files from an old unslung root partition. 2004/10/28 17:00:22-07:00 bkbits.net!nslu2-linux.adm Merge bk://openembedded.bkbits.net/packages into bkbits.net:/repos/n/nslu2-linux/packages 2004/10/25 14:23:02-04:00 uottawa.ca!stephane Added /dev entry for NSLU2's software-based I2C adapter. 2004/10/25 14:21:22-04:00 uottawa.ca!stephane Initial integration of Kas11's x1205-rtc drivers. 2004/10/25 23:49:37+09:30 (none)!rwhitby Fixed a bug in nslu2-unslung-ramdisk 2004/10/25 22:35:52+09:30 (none)!rwhitby Merge bk://nslu2-linux@nslu2-linux.bkbits.net/packages into home.(none):/home/openembedded/packages 2004/10/25 05:58:22-07:00 bkbits.net!nslu2-linux.adm Merge bk://openembedded.bkbits.net/packages into bkbits.net:/repos/n/nslu2-linux/packages 2004/10/25 22:21:41+09:30 (none)!rwhitby Unslung: Added the Unslung Doc link to the User Guide page, and added the flashfs script. 2004/10/25 10:15:35+02:00 (none)!chriz Fix for Genesys Logic based devices (e.g. gl811e). For details refer to: http://www.mail-archive.com/linux-usb-users@lists.sourceforge.net/msg10941.html http://www.mail-archive.com/linux-usb-users@lists.sourceforge.net/msg10981.html BKrev: 4188153fr__wrRFQlfc9zi6SJ3JVsw
Diffstat (limited to 'nslu2-binary-only/nslu2-unslung-ramdisk')
-rw-r--r--nslu2-binary-only/nslu2-unslung-ramdisk/able/linuxrc0
-rw-r--r--nslu2-binary-only/nslu2-unslung-ramdisk/flashfs0
-rw-r--r--nslu2-binary-only/nslu2-unslung-ramdisk/unsling113
3 files changed, 113 insertions, 0 deletions
diff --git a/nslu2-binary-only/nslu2-unslung-ramdisk/able/linuxrc b/nslu2-binary-only/nslu2-unslung-ramdisk/able/linuxrc
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/nslu2-binary-only/nslu2-unslung-ramdisk/able/linuxrc
diff --git a/nslu2-binary-only/nslu2-unslung-ramdisk/flashfs b/nslu2-binary-only/nslu2-unslung-ramdisk/flashfs
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/nslu2-binary-only/nslu2-unslung-ramdisk/flashfs
diff --git a/nslu2-binary-only/nslu2-unslung-ramdisk/unsling b/nslu2-binary-only/nslu2-unslung-ramdisk/unsling
index e69de29bb2..f0345aba70 100644
--- a/nslu2-binary-only/nslu2-unslung-ramdisk/unsling
+++ b/nslu2-binary-only/nslu2-unslung-ramdisk/unsling
@@ -0,0 +1,113 @@
+#!/bin/sh
+
+# Only do this if we have booted from the ramdisk.
+
+if [ "`cat /proc/sys/kernel/real-root-dev`" != 256 ] ; then
+ echo "Cannot unsling an active unslung root partition!"
+ exit 0
+fi
+
+# Set or seach for target disk
+
+if [ $# -gt 1 ] ; then
+ echo "Usage: $0 [flash|hdd]"
+ exit 1
+fi
+
+if [ $# -eq 1 ] ; then
+ if [ "$1" = "flash" -o "$1" = "hdd" ] ; then
+ targ=/share/$1/conf
+ else
+ echo "Usage: $0 [flash|hdd]"
+ exit 1
+ fi
+elif [ -d /share/hdd/conf/lost+found ] ; then
+ targ=/share/hdd/conf
+elif [ -d /share/flash/conf/lost+found ] ; then
+ targ=/share/flash/conf
+else
+ echo "Cannot locate target root partition"
+ exit 1
+fi
+
+echo "Target root partition is $targ"
+
+echo "Removing conflicts from old unslung root partition."
+rm -f $targ/bin/ipkg
+
+# Unsling it!
+
+copyfiles=".unslung bin dev etc home lib linuxrc mnt sbin usr"
+
+echo "Copying ramdisk files to new unslung root partition."
+cd /
+tar cf - $copyfiles | ( cd $targ ; tar xf - )
+
+# Create other required directories.
+
+echo "Creating required mount points and empty directories."
+
+rm -rf $targ/tmp && mkdir $targ/tmp
+
+[ ! -d $targ/share ] && mkdir $targ/share
+[ ! -d $targ/share/flash ] && mkdir $targ/share/flash
+[ ! -d $targ/share/flash/conf ] && mkdir $targ/share/flash/conf
+[ ! -d $targ/share/flash/data ] && mkdir $targ/share/flash/data
+[ ! -d $targ/share/hdd ] && mkdir $targ/share/hdd
+[ ! -d $targ/share/hdd/conf ] && mkdir $targ/share/hdd/conf
+[ ! -d $targ/share/hdd/data ] && mkdir $targ/share/hdd/data
+[ ! -d $targ/mnt ] && mkdir $targ/mnt
+[ ! -d $targ/mnt/backup ] && mkdir $targ/mnt/backup
+[ ! -d $targ/mnt/repair ] && mkdir $targ/mnt/repair
+[ ! -d $targ/mnt/tmpmnt ] && mkdir $targ/mnt/tmpmnt
+[ ! -d $targ/proc ] && mkdir $targ/proc
+[ ! -d $targ/upload ] && mkdir $targ/upload
+[ ! -d $targ/var ] && mkdir $targ/var
+[ ! -d $targ/var/empty ] && mkdir $targ/var/empty
+[ ! -d $targ/var/lock ] && mkdir $targ/var/lock
+[ ! -d $targ/var/log ] && mkdir $targ/var/log
+[ ! -d $targ/var/run ] && mkdir $targ/var/run
+[ ! -d $targ/var/tmp ] && mkdir $targ/var/tmp
+
+# Ensure /unslung is there.
+
+if [ ! -d $targ/unslung ] ; then
+
+ echo "Creating new /unslung directory on unslung root partition."
+
+ mkdir $targ/unslung
+
+else
+ echo "Preserving existing /unslung directory on unslung root partition."
+fi
+
+# Ensure /root is there.
+
+if [ ! -d $targ/root ] ; then
+
+ echo "Creating new /root directory on unslung root partition."
+
+ mkdir $targ/root
+
+else
+ echo "Preserving existing /root directory on unslung root partition."
+fi
+
+# Ensure /opt is there.
+
+if [ ! -d $targ/opt ] ; then
+
+ echo "Creating new /opt directory on unslung root partition."
+
+ mkdir $targ/opt
+
+else
+ echo "Preserving existing /opt directory on unslung root partition."
+fi
+
+echo "Unslinging any default root passwords."
+
+[ -f $targ/passwd ] && sed -i -e 's/^root:WeeOvKUvbQ6nI:0:0:root:/root:t1PLUeOinN\/eI:0:0:root:/' $targ/passwd
+[ -f $targ/usr/local/passwd ] && sed -i -e 's/^root:WeeOvKUvbQ6nI:0:0:root:/root:t1PLUeOinN\/eI:0:0:root:/' $targ/usr/local/passwd
+
+exit 0