unslung: Usability updates for Unslung 6.x - ipkg prints message when booted on flash...
authorRod Whitby <rod@whitby.id.au>
Wed, 4 Jan 2006 12:08:04 +0000 (12:08 +0000)
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>
Wed, 4 Jan 2006 12:08:04 +0000 (12:08 +0000)
21 files changed:
conf/distro/unslung.conf
packages/linux/unslung-kernel_2.4.22.l2.3r25.bb [deleted file]
packages/meta/unslung-image.bb
packages/nslu2-binary-only/nslu2-linksys-firmware_2.3r25.bb [deleted file]
packages/nslu2-binary-only/nslu2-linksys-libs_2.3r25.bb [deleted file]
packages/nslu2-binary-only/nslu2-linksys-libs_2.3r63.bb
packages/nslu2-binary-only/nslu2-linksys-ramdisk_2.3r25.bb [deleted file]
packages/nslu2-binary-only/nslu2-linksys-ramdisk_2.3r63.bb
packages/nslu2-binary-only/unslung-rootfs-2.3r63/ipkg-fl [new file with mode: 0755]
packages/nslu2-binary-only/unslung-rootfs-2.3r63/linuxrc
packages/nslu2-binary-only/unslung-rootfs-2.3r63/motd-fl [new file with mode: 0644]
packages/nslu2-binary-only/unslung-rootfs-2.3r63/motd-un [new file with mode: 0644]
packages/nslu2-binary-only/unslung-rootfs-2.3r63/unsling
packages/nslu2-binary-only/unslung-rootfs/rc.1-diversion.patch
packages/nslu2-binary-only/unslung-rootfs/rc.halt-diversion.patch
packages/nslu2-binary-only/unslung-rootfs/rc.optware-start [moved from packages/nslu2-binary-only/unslung-rootfs/rc.unslung-start with 87% similarity]
packages/nslu2-binary-only/unslung-rootfs/rc.optware-stop [moved from packages/nslu2-binary-only/unslung-rootfs/rc.unslung-stop with 87% similarity]
packages/nslu2-binary-only/unslung-rootfs/rc.reboot-diversion.patch
packages/nslu2-binary-only/unslung-rootfs/unslung.gif [new file with mode: 0644]
packages/nslu2-binary-only/unslung-rootfs_2.3r25.bb [deleted file]
packages/nslu2-binary-only/unslung-rootfs_2.3r63.bb

index 1777135..5a88ac9 100644 (file)
@@ -3,7 +3,7 @@
 #@DESCRIPTION: Unslung Linux Distribution for the NSLU2
 
 DISTRO_NAME = "Unslung"
-DISTRO_VERSION = "6.2-alpha"
+DISTRO_VERSION = "6.5-alpha"
 DISTRO_TYPE = "beta"
 
 FEED_URIS  = "cross##http://ipkg.nslu2-linux.org/feeds/optware/nslu2/cross/stable"
@@ -39,11 +39,7 @@ UNSLUNG_DEVICE_TABLE = "${@bb.which(bb.data.getVar('BBPATH', d, 1), 'files/devic
 EXTRA_IMAGECMD_jffs2 = "--pad --big-endian --eraseblock=0x20000 -D ${UNSLUNG_DEVICE_TABLE}"
 
 UNSLUNG_EXTRA_DEPENDS  ?= ""
-UNSLUNG_EXTRA_RDEPENDS ?= "\
-kernel-module-usbnet \
-kernel-module-pegasus kernel-module-kaweth \
-kernel-module-usbserial \
-kernel-module-pl2303 kernel-module-ftdi-sio"
+UNSLUNG_EXTRA_RDEPENDS ?= ""
 
 UNSLUNG_EXTRA_INSTALL ?= "${UNSLUNG_EXTRA_RDEPENDS}"
 
diff --git a/packages/linux/unslung-kernel_2.4.22.l2.3r25.bb b/packages/linux/unslung-kernel_2.4.22.l2.3r25.bb
deleted file mode 100644 (file)
index 99bf69a..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-SECTION = "kernel"
-
-include nslu2-linksys-kernel_2.4.22.bb
-
-DESCRIPTION = "Unslung kernel for the Linksys NSLU2 device"
-MAINTAINER = "NSLU2 Linux <www.nlsu2-linux.org>"
-PR = "r19"
-
-KERNEL_SUFFIX = "unslung"
-
-CMDLINE_ROOT = "root=/dev/mtdblock4 rootfstype=jffs2 rw init=/linuxrc mem=32M@0x00000000"
-
-UNSLUNG_KERNEL_EXTRA_SRC_URI ?=
-
-SRC_URI += "file://limit1gb.patch;patch=1 \
-           file://gl811e.patch;patch=1 \
-           file://ext3flash-on-disk1.patch;patch=1 \
-           file://usbnet.patch;patch=1 \
-           file://missing-usb-ioctls.patch;patch=1 \
-           file://anonymiser.patch;patch=1 \
-           file://ppp_mppe.patch;patch=1 \
-           file://nfs-blocksize.patch;patch=1 \
-           file://pl2303.patch;patch=1 \
-           ${UNSLUNG_KERNEL_EXTRA_SRC_URI}"
-
-FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/unslung-kernel', '${FILE_DIRNAME}/nslu2-linksys-kernel-2.4.22', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
-
-python () {
-       # Don't build unslung kernel unless we're targeting an nslu2
-       mach = bb.data.getVar("MACHINE", d, 1)
-       dist = bb.data.getVar("DISTRO", d, 1)
-       if mach != 'nslu2' or dist != 'unslung':
-               raise bb.parse.SkipPackage("Unslung only builds for the Linksys NSLU2")
-}
index f9fda0a..265986b 100644 (file)
@@ -1,5 +1,5 @@
 LICENSE = MIT
-PR = "r7"
+PR = "r11"
 
 IMAGE_BASENAME = "unslung"
 
@@ -7,13 +7,11 @@ IMAGE_LINGUAS = ""
 USE_DEVFS = "1"
 
 DEPENDS  = "unslung-kernel unslung-rootfs \
-       glibc slingbox ipkg wget cpio findutils portmap-unslung \
-       devio \
+       glibc slingbox ipkg cpio findutils \
        ${UNSLUNG_EXTRA_DEPENDS}"
 
 IPKG_INSTALL = "unslung-rootfs \
-       libc6-unslung slingbox ipkg wget cpio findutils portmap-unslung \
-       devio \
+       libc6-unslung slingbox ipkg cpio findutils \
        ${UNSLUNG_EXTRA_INSTALL}"
 
 IMAGE_PREPROCESS_COMMAND += "unslung_clean_image; "
@@ -31,10 +29,10 @@ 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 /lib/*.dat files cause they are too big
-       rm -f ${IMAGE_ROOTFS}/lib/*.dat
        # Remove the ipkg symlink - unsling puts it back in
        rm -f ${IMAGE_ROOTFS}${bindir}/ipkg
+       # and make the ipkg symlink point to the ipkg-fl utility instead.
+       ln -s ipkg-fl ${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
@@ -44,6 +42,34 @@ unslung_clean_image () {
        echo "#!/bin/sh" > ${IMAGE_ROOTFS}/sbin/depmod
        echo "exit 0" >> ${IMAGE_ROOTFS}/sbin/depmod
        chmod ugo+x ${IMAGE_ROOTFS}/sbin/depmod
+       ${STRIP} ${IMAGE_ROOTFS}/lib/libgcc_s.so.1
+       chmod ugo+x ${IMAGE_ROOTFS}/lib/libgcc_s.so.1
+
+       # Remove some of the Samba codepages to make space
+       # 437 (USA) - keep
+       # 737 (Greek)
+       rm -f ${IMAGE_ROOTFS}/etc/samba/codepages/codepage.737
+       rm -f ${IMAGE_ROOTFS}/etc/samba/codepages/unicode_map.737
+       # 850 (Latin1) - keep
+       # 852 (Latin2)
+       rm -f ${IMAGE_ROOTFS}/etc/samba/codepages/codepage.852
+       rm -f ${IMAGE_ROOTFS}/etc/samba/codepages/unicode_map.852
+       # 861 (Iceland)
+       rm -f ${IMAGE_ROOTFS}/etc/samba/codepages/codepage.861
+       rm -f ${IMAGE_ROOTFS}/etc/samba/codepages/unicode_map.861
+       # 866 (Russian)
+       rm -f ${IMAGE_ROOTFS}/etc/samba/codepages/codepage.866
+       rm -f ${IMAGE_ROOTFS}/etc/samba/codepages/unicode_map.866
+       # 932 (Japanese Shift-JIS)
+       rm -f ${IMAGE_ROOTFS}/etc/samba/codepages/codepage.932
+       rm -f ${IMAGE_ROOTFS}/etc/samba/codepages/unicode_map.932
+       # 936 (Simplified Chinese)
+       rm -f ${IMAGE_ROOTFS}/etc/samba/codepages/codepage.936
+       # 949 (Korean)
+       rm -f ${IMAGE_ROOTFS}/etc/samba/codepages/codepage.949
+       # 950 (Chinese BIG-5)
+       rm -f ${IMAGE_ROOTFS}/etc/samba/codepages/codepage.950
+       # ISO8859-1 (Latin 1) - keep
 }
 
 python () {
diff --git a/packages/nslu2-binary-only/nslu2-linksys-firmware_2.3r25.bb b/packages/nslu2-binary-only/nslu2-linksys-firmware_2.3r25.bb
deleted file mode 100644 (file)
index afbb782..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-SECTION = "base"
-DEPENDS = "slugimage-native unzip-native"
-PACKAGES = ""
-LICENSE = "GPL"
-INHIBIT_DEFAULT_DEPS = "1"
-PR = "r3"
-
-SRC_URI = "ftp://ftp.linksys.com/pub/network/nslu2-fw-2.3r25.zip"
-S = "${WORKDIR}"
-
-python () {
-       # Don't build unless we're targeting an nslu2
-       if bb.data.getVar("MACHINE", d, 1) != "nslu2":
-               raise bb.parse.SkipPackage("NSLU2 firmware only builds for the Linksys NSLU2")
-}
-
-do_compile () {
-       slugimage -u -i NSLU2_V23R25.bin -b RedBoot -s SysConf -r ramdisk.ext2.gz -t Trailer
-       install -d ${STAGING_LIBDIR}/nslu2-binaries
-       install -m 0755 RedBoot ${STAGING_LIBDIR}/nslu2-binaries/
-       install -m 0755 SysConf ${STAGING_LIBDIR}/nslu2-binaries/
-       install -m 0755 ramdisk.ext2.gz ${STAGING_LIBDIR}/nslu2-binaries/
-       install -m 0755 Trailer ${STAGING_LIBDIR}/nslu2-binaries/
-}
diff --git a/packages/nslu2-binary-only/nslu2-linksys-libs_2.3r25.bb b/packages/nslu2-binary-only/nslu2-linksys-libs_2.3r25.bb
deleted file mode 100644 (file)
index b9fd20a..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-DESCRIPTION = "Linksys NSLU2 Stock Firmware Libraries."
-PACKAGE_ARCH = "nslu2"
-SECTION = "base"
-PRIORITY = "required"
-PR = "r2"
-
-SRC_URI = "http://nslu.sf.net/downloads/nslu2-linksys-ramdisk-2.3r25.tar.bz2"
-
-S = "${WORKDIR}/nslu2-linksys-ramdisk-2.3r25"
-
-do_install () {
-       ( cd ${S} ; rm -rf bin dev home mnt proc sbin share tmp upload usr var )
-       ( cd ${S} ; tar cvf - . ) | ( cd ${D} ; tar xvf - )
-}
-
-PACKAGES = "${PN}"
-FILES_${PN} = "/lib"
-
-python () {
-       # Don't build unless we're targeting an nslu2
-       if bb.data.getVar("MACHINE", d, 1) != "nslu2":
-               raise bb.parse.SkipPackage("NSLU2 stock firmware libraries only builds for the Linksys NSLU2")
-}
index 2955f19..1843de0 100644 (file)
@@ -2,9 +2,9 @@ DESCRIPTION = "Linksys NSLU2 Stock Firmware Libraries."
 PACKAGE_ARCH = "nslu2"
 SECTION = "base"
 PRIORITY = "required"
-PR = "r1"
+PR = "r2"
 
-SRC_URI = "http://nslu.sf.net/downloads/nslu2-linksys-ramdisk-2.3r63.tar.bz2"
+SRC_URI = "http://nslu.sf.net/downloads/nslu2-linksys-ramdisk-2.3r63-2.tar.bz2"
 
 S = "${WORKDIR}/nslu2-linksys-ramdisk-2.3r63"
 
diff --git a/packages/nslu2-binary-only/nslu2-linksys-ramdisk_2.3r25.bb b/packages/nslu2-binary-only/nslu2-linksys-ramdisk_2.3r25.bb
deleted file mode 100644 (file)
index f20a277..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-DESCRIPTION = "Linksys NSLU2 Stock Firmware Ramdisk."
-PACKAGE_ARCH = "nslu2"
-SECTION = "base"
-PRIORITY = "required"
-PR = "r1"
-
-SRC_URI = "http://nslu.sf.net/downloads/nslu2-linksys-ramdisk-2.3r25.tar.bz2"
-
-do_install () {
-       ( cd ${S} ; tar cvf - . ) | ( cd ${D} ; tar xvf - )
-}
-
-PACKAGES = "${PN}"
-FILES_${PN} = "/"
-
-python () {
-       # Don't build unless we're targeting an nslu2
-       if bb.data.getVar("MACHINE", d, 1) != "nslu2":
-               raise bb.parse.SkipPackage("NSLU2 ramdisk only builds for the Linksys NSLU2")
-}
index 0fa7d69..007b19c 100644 (file)
@@ -2,9 +2,9 @@ DESCRIPTION = "Linksys NSLU2 Stock Firmware Ramdisk."
 PACKAGE_ARCH = "nslu2"
 SECTION = "base"
 PRIORITY = "required"
-PR = "r1"
+PR = "r2"
 
-SRC_URI = "http://nslu.sf.net/downloads/nslu2-linksys-ramdisk-2.3r63.tar.bz2"
+SRC_URI = "http://nslu.sf.net/downloads/nslu2-linksys-ramdisk-2.3r63-2.tar.bz2"
 
 do_install () {
        ( cd ${S} ; tar cvf - . ) | ( cd ${D} ; tar xvf - )
diff --git a/packages/nslu2-binary-only/unslung-rootfs-2.3r63/ipkg-fl b/packages/nslu2-binary-only/unslung-rootfs-2.3r63/ipkg-fl
new file mode 100755 (executable)
index 0000000..514ccd4
--- /dev/null
@@ -0,0 +1,11 @@
+#! /bin/sh
+echo
+echo "Error:  The ipkg command cannot currently be used because this"
+echo "system is running from its internal flash; it is not currently"
+echo "\"uNSLUng\" to an external disk or flash device."
+echo
+echo "Please complete the process of \"unslinging\" this system, or"
+echo "resolve the issues that did not permit it to boot from the"
+echo "external device before installing any ipkg packages or updates."
+echo
+exit 1
index cc53d44..d8a0e5d 100755 (executable)
@@ -15,8 +15,8 @@ cnt=20
 while [ $cnt -gt 0 ] ; do
   echo -ne "\r$cnt "
   sleep 1
-  [ -f /proc/hdd_sdb ] && cnt=0
-  [ -f /proc/hdd_sda ] && cnt=0
+  [ -e /.sda1root -a -f /proc/hdd_sda ] && cnt=0
+  [ -e /.sdb1root -a -f /proc/hdd_sdb ] && cnt=0
   cnt=`expr $cnt - 1`
 done
 echo
@@ -25,10 +25,10 @@ sleep 5
 
 mounted=
 
-for prefroot in sdb1 sda1 ; do
-  if [ -z "$mounted" ] ; then
+for prefroot in sda1 sdb1 ; do
+  if [ -z "$mounted" -a -e /.${prefroot}root ] ; then
     if /bin/mount -rt ext3 /dev/$prefroot /mnt ; then
-      if [ -x /mnt/bin/init ] ; then
+      if [ -e /mnt/.${prefroot}root -a -x /mnt/bin/init ] ; then
         /bin/echo "Root filesystem will be mounted from /dev/$prefroot ..."
         mounted=/mnt
       else
diff --git a/packages/nslu2-binary-only/unslung-rootfs-2.3r63/motd-fl b/packages/nslu2-binary-only/unslung-rootfs-2.3r63/motd-fl
new file mode 100644 (file)
index 0000000..aafcd21
--- /dev/null
@@ -0,0 +1,11 @@
+
+Welcome to Unslung @v@
+
+   -------- NOTE: RUNNING FROM INTERNAL FLASH  --------
+
+This system is currently running from the internal flash memory,
+it has NOT booted up into "unslung" mode from an external drive.
+
+In this mode, very few services are running, and available disk
+space is extremely limited.  This mode is normally only used
+for initial installation, and system maintenance and recovery.
diff --git a/packages/nslu2-binary-only/unslung-rootfs-2.3r63/motd-un b/packages/nslu2-binary-only/unslung-rootfs-2.3r63/motd-un
new file mode 100644 (file)
index 0000000..5439b08
--- /dev/null
@@ -0,0 +1,4 @@
+
+Welcome to Unslung @v@
+
+   ---------- NOTE: THIS SYSTEM IS CURRENTLY UNSLUNG ----------
index bed1789..3c25316 100755 (executable)
@@ -1,23 +1,30 @@
 #!/bin/sh
 
-usage="Usage: $0 disk1|disk2"
-
-# Set target disk
+usage="Usage: $0 [-nopw] disk1|disk2"
 
+nopw=0
 if [ $# -gt 1 ] ; then
-    echo $usage
-    exit 1
+    if [ "$1" = "-nopw" ] ; then
+       nopw=1
+       shift
+    fi
 fi
 
+# Set target disk
+
 if [ $# -eq 1 ] ; then
     if [ "$1" = "disk1" ] ; then
        mtch="/dev/sdb1 /share/hdd/data ext3 rw 0 0"
        targ=/share/hdd/data
-       flag=.sda1root
+       targconf=/share/hdd/conf
+       flag=.sdb1root
+       htmlinfo="disk1, /dev/sdb1"
     elif [ "$1" = "disk2" ] ; then
        mtch="/dev/sda1 /share/flash/data ext3 rw 0 0"
        targ=/share/flash/data
-       flag=.sdb1root
+       targconf=/share/flash/conf
+       flag=.sda1root
+       htmlinfo="disk2, /dev/sda1"
     else
        echo $usage
        exit 1
@@ -27,13 +34,57 @@ else
     exit 1
 fi
 
+# Check that we can unsling at all!  An unsling operation creates a new
+# rootfs, but it also marks the flash rootfs (with a flag file such as
+# ".sda1root") so that subsequent boots do not create the "var.state"
+# and "dev.state" mounts.  Without those mounts, though, an attempt to
+# unsling will write a new rootfs on the target with an empty /dev
+# directory, which doesnt' work really well.  So this check is all about
+# making sure that we are in a state in which we are capable of
+# performing the unsling operation.
+
+echo "Checking if able to unsling..."
+echo
+m1="/dev/root /dev.state jffs2 rw 0 0"
+m2="/dev/root /var.state jffs2 rw 0 0"
+if ! grep "$m1" /proc/mounts >/dev/null 2>&1 || ! grep "$m2" /proc/mounts >/dev/null 2>&1 ; then
+    echo "Error: This system is unable to properly unsling because certain"
+    echo "required mounts (dev.state and/or var.state) are not available."
+    echo "This is most probably because you have already unslung this system."
+    echo
+
+    if   [ -f /.sda1root ] ; then
+       rm -f /.sda1root
+    elif [ -f /.sdb1root ] ; then
+       rm -f /.sdb1root
+    elif [ -f /.sda2root ] ; then
+       rm -f /.sda2root
+    elif [ -f /.sdb2root ] ; then
+       rm -f /.sdb2root
+    else
+       echo "However, in this case, the flags that indicate an already-unslung"
+       echo "system seem to be missing.  Try restarting your NSLU2 to correct,"
+       echo "but if the problem persists, try re-flashing your NSLU2."
+       exit 1
+    fi
+    echo "The flags that indicate an already-unslung system have now been"
+    echo "removed and the required mounts should now become present after"
+    echo "reboot of the NSLU2."
+    echo
+    echo "1) Please unplug all drives from the NSLU2,"
+    echo "2) reboot,"
+    echo "3) and retry the unslinging process."
+    exit 1
+fi
+
 # Check it's a real mount point
 
-echo "Waiting for $targ"
+echo "Waiting for $targ ..."
 CNT=120
 while [ $CNT -gt 0 ]
 do
    if grep "$mtch" /proc/mounts >/dev/null 2>&1 ; then
+       echo
        echo "Target disk is $targ"
        CNT=-1
    else
@@ -43,10 +94,52 @@ do
    fi
 done
 if [ $CNT -eq 0 ] ; then
-   echo "Error: $targ is not a mounted disk"
+   echo
+   echo "Error: $targ ($htmlinfo) is not a mounted disk"
    exit 1
 fi
 
+# Do a quick sanity check to make sure we're unslinging to a disk that's been
+# formatted by the Linksys code.
+
+echo "Checking that $targ has been properly formatted..."
+if ! [ -d $targ/public ] || ! [ -f $targconf/.dongle ] || ! [ -f $targconf/passwd ] ; then
+    echo
+    echo "Error: $targ does not appear to have been formatted by the"
+    echo "Linksys formatting utility.  Please go to the web interface,"
+    echo "and format the drive before unslinging."
+    exit 1
+fi
+
+echo "Checking that $targ is clean..."
+if [ -f $targ/.unslung ] ; then
+    echo
+    echo "Error: $targ appears to have already been unslung to:"
+    cat $targ/.unslung
+    echo "Please go to the web interface, and format the drive before"
+    echo "unslinging."
+    echo
+    echo "(Or, if you wish to unsling without removing the current root"
+    echo "filesystem, simply remove the file $targ/.unslung and retry"
+    echo "the unsling -- but beware, you enter uncharted territory!)"
+    exit 1
+fi
+
+# Change the root password
+if [ "$nopw" = 0 ] ; then
+   echo
+   echo "Please enter the new root password.  This will be the new root"
+   echo "password used when the NSLU2 boots up with or without disks"
+   echo
+   passwd
+   if [ $? != 0 ] ; then
+       echo "Error setting password."
+       exit 1
+   fi
+   cp /etc/passwd /usr/local/passwd
+   cp /etc/passwd $targconf/passwd
+fi
+
 # Start at the root directory
 
 cd /
@@ -60,7 +153,8 @@ fi
 
 # Copy the complete rootfs to the target.
 
-echo "Copying the complete rootfs from / to $targ."
+echo
+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
@@ -75,6 +169,16 @@ 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
 
+echo "Linking /etc/motd to the unslung motd on target disk."
+rm -f $targ/etc/motd ; ln -s /etc/motd-un $targ/etc/motd
+
+echo "Updating /home/httpd/html/home.htm with target disk info."
+sedcommand="s#Running.from.Internal.Flash#Unslung to $htmlinfo#"
+rm -f $targ/home/httpd/html/home.htm_bak
+cp $targ/home/httpd/html/home.htm $targ/home/httpd/html/home.htm_bak
+sed "$sedcommand" $targ/home/httpd/html/home.htm_bak > $targ/home/httpd/html/home.htm
+chmod 644 $targ/home/httpd/html/home.htm
+
 # Create the boot flag file.
 
 rm -f /.sd??root $targ/.sd??root
@@ -83,4 +187,12 @@ echo "Creating /$flag to direct switchbox to boot from $targ."
 echo > /$flag
 echo > $targ/$flag
 
+# Done
+
+echo
+echo "Unsling complete."
+echo
+echo "Leave the device $htmlinfo plugged in, and reboot"
+echo "in order to boot this system up into unslung mode."
+
 exit 0
index 8d9f1f6..35015d6 100644 (file)
@@ -12,7 +12,7 @@
  /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 )
++/bin/echo  "Starting Optware Packages:"; ( . /etc/rc.d/rc.optware-start )
 +
  /usr/bin/Set_Led ready
  /usr/bin/Set_Led beep1
index 4723dfa..3702c3d 100644 (file)
@@ -5,7 +5,7 @@
 +
 +if ( [ -r /unslung/rc.halt ] && . /unslung/rc.halt ) ; then return 0 ; fi
 +
-+/bin/echo  "Stopping UNSLUNG Packages:"; ( . /etc/rc.d/rc.unslung-stop )
++/bin/echo  "Stopping Optware Packages:"; ( . /etc/rc.d/rc.optware-stop )
 +
  /bin/killall -2 upnpd &>/dev/null
  /bin/killall nmbd &>/dev/null
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-if ( [ -f /unslung/rc.unslung-start ] && . /unslung/rc.unslung-start ) ; then return 0 ; fi
+if ( [ -f /unslung/rc.optware-start ] && . /unslung/rc.optware-start ) ; then return 0 ; fi
 
 # Start all init scripts in /opt/etc/init.d
 # executing them in numerical order.
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-if ( [ -f /unslung/rc.unslung-stop ] && . /unslung/rc.unslung-stop ) ; then return 0 ; fi
+if ( [ -f /unslung/rc.optware-stop ] && . /unslung/rc.optware-stop ) ; then return 0 ; fi
 
 # Stop all init scripts in /opt/etc/init.d
 # executing them in numerical order.
index 2b8bf64..3e73b94 100644 (file)
@@ -5,7 +5,7 @@
 +
 +if ( [ -r /unslung/rc.reboot ] && . /unslung/rc.reboot ) ; then return 0 ; fi
 +
-+/bin/echo  "Stopping UNSLUNG Packages:"; ( . /etc/rc.d/rc.unslung-stop )
++/bin/echo  "Stopping Optware Packages:"; ( . /etc/rc.d/rc.optware-stop )
 +
  /bin/killall -2 upnpd 2>/dev/null
  sleep 4
diff --git a/packages/nslu2-binary-only/unslung-rootfs/unslung.gif b/packages/nslu2-binary-only/unslung-rootfs/unslung.gif
new file mode 100644 (file)
index 0000000..998beed
Binary files /dev/null and b/packages/nslu2-binary-only/unslung-rootfs/unslung.gif differ
diff --git a/packages/nslu2-binary-only/unslung-rootfs_2.3r25.bb b/packages/nslu2-binary-only/unslung-rootfs_2.3r25.bb
deleted file mode 100644 (file)
index d80da29..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-SECTION = "base"
-
-PR = "r66"
-
-UNSLUNG_VERSION = "4.21-beta"
-
-DEPENDS = "nslu2-linksys-libs"
-
-SRC_URI = "http://nslu.sf.net/downloads/nslu2-linksys-ramdisk-2.3r25.tar.bz2 \
-          file://README \
-          file://NOTES \
-          file://unsling \
-          file://resling \
-          file://slingover \
-          file://linuxrc \
-          file://nsswitch.conf \
-          file://rc.unslung-start \
-          file://rc.unslung-stop \
-          file://rc-diversion.patch;patch=1 \
-          file://rc.1-diversion.patch;patch=1 \
-          file://rc.crond-diversion.patch;patch=1 \
-          file://rc.halt-diversion.patch;patch=1 \
-          file://rc.local-diversion.patch;patch=1 \
-          file://rc.modules-diversion.patch;patch=1 \
-          file://rc.network-diversion.patch;patch=1 \
-          file://rc.quickset-diversion.patch;patch=1 \
-          file://rc.quota-diversion.patch;patch=1 \
-          file://rc.reboot-diversion.patch;patch=1 \
-          file://rc.reset_usrgrpshare-diversion.patch;patch=1 \
-          file://rc.rstimezone-diversion.patch;patch=1 \
-          file://rc.samba-diversion.patch;patch=1 \
-          file://rc.sysinit-diversion.patch;patch=1 \
-          file://rc.thttpd-diversion.patch;patch=1 \
-          file://rc.xinetd-diversion.patch;patch=1 \
-          file://root-passwd.patch;patch=1 \
-          file://tmp-handling.patch;patch=1 \
-          file://create-ramdisks.patch;patch=1 \
-          file://remount-noatime.patch;patch=1 \
-          file://initialise-mtab.patch;patch=1 \
-          file://wait-for-quotacheck.patch;patch=1 \
-          file://mount_usbdevfs.patch;patch=1 \
-          file://maintmode.cgi file://upgrade-maint.htm \
-          file://upgrade-nomaint.htm file://upgrade-inhibit.htm \
-          file://rc.bootbin \
-          "
-
-S = "${WORKDIR}/nslu2-linksys-ramdisk-2.3r25"
-
-python () {
-       # Don't build unslung images unless we're targeting an nslu2
-       mach = bb.data.getVar("MACHINE", d, 1)
-       dist = bb.data.getVar("DISTRO", d, 1)
-       if mach != 'nslu2' or dist != 'unslung':
-               raise bb.parse.SkipPackage("Unslung only builds for the Linksys NSLU2")
-}
-
-do_compile () {
-       echo "V2.3R25-uNSLUng-${UNSLUNG_VERSION}" > ${S}/.unslung
-
-       sed -i -e s/@version#/@version#-uNSLUng-${UNSLUNG_VERSION}/ ${S}/home/httpd/html/home.htm
-       sed -i -e 's|>&nbsp;<|><a href="Unslung" class="mainmenu" target="_top">Unslung Doco</a><|' \
-               ${S}/home/httpd/html/manhead.htm
-
-       # Somehow these two slipped through - this is easier than updating the tar file.
-       rm -f ${S}/etc/rc.orig
-       rm -f ${S}/etc/rc.d/rc.1.orig
-
-       install -m 755 ${WORKDIR}/linuxrc ${S}/linuxrc
-
-       # Allow rc.bootbin to be diverted.
-       mv ${S}/etc/rc.d/rc.bootbin ${S}/sbin/rc.bootbin
-       install -m 755 ${WORKDIR}/rc.bootbin ${S}/etc/rc.d/rc.bootbin
-
-       install -d ${S}/initrd
-
-       install -m 755 ${WORKDIR}/unsling ${S}/sbin/unsling
-       install -m 755 ${WORKDIR}/resling ${S}/sbin/resling
-       install -m 755 ${WORKDIR}/slingover ${S}/sbin/slingover
-       install -m 755 ${WORKDIR}/rc.unslung-start ${S}/etc/rc.d/rc.unslung-start
-       install -m 755 ${WORKDIR}/rc.unslung-stop ${S}/etc/rc.d/rc.unslung-stop
-
-       install -m 644 ${WORKDIR}/nsswitch.conf ${S}/etc/nsswitch.conf
-
-       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
-
-       # Add the diversion script directory
-       install -d ${S}/unslung
-
-       # Remove the libraries, because they are in nslu2-linksys-libs now
-       rm -rf ${S}/lib
-
-       # Install maintenance mode files
-       install -m 755 ${WORKDIR}/maintmode.cgi ${S}/home/httpd/html/Management
-       install -m 644 ${WORKDIR}/upgrade-maint.htm ${S}/home/httpd/html/Management/upgrade-maint.htm
-       install -m 644 ${WORKDIR}/upgrade-nomaint.htm ${S}/home/httpd/html/Management/upgrade-nomaint.htm
-       install -m 644 ${WORKDIR}/upgrade-inhibit.htm ${S}/home/httpd/html/Management/upgrade-inhibit.htm
-       install -m 644 ${WORKDIR}/upgrade-nomaint.htm ${S}/home/httpd/html/Management/upgrade.htm
-       sed -i -e s/@ds_sw_version#/@ds_sw_version#-uNSLUng-${UNSLUNG_VERSION}/ \
-               ${S}/home/httpd/html/Management/upgrade-maint.htm
-       sed -i -e s/@ds_sw_version#/@ds_sw_version#-uNSLUng-${UNSLUNG_VERSION}/ \
-               ${S}/home/httpd/html/Management/upgrade-nomaint.htm
-       sed -i -e s/@ds_sw_version#/@ds_sw_version#-uNSLUng-${UNSLUNG_VERSION}/ \
-               ${S}/home/httpd/html/Management/upgrade-inhibit.htm
-       sed -i -e s/@ds_sw_version#/@ds_sw_version#-uNSLUng-${UNSLUNG_VERSION}/ \
-               ${S}/home/httpd/html/Management/upgrade.htm
-}
-
-do_install () {
-       ( cd ${S} ; tar -c -v -f - --exclude '.pc' . ) | ( cd ${D} ; tar xvf - )
-}
-
-PACKAGES = "${PN}"
-FILES_${PN} = "/"
-RDEPENDS_${PN} = "nslu2-linksys-libs"
index 7749db0..d45e410 100644 (file)
@@ -1,19 +1,23 @@
 SECTION = "base"
 
-PR = "r4"
+PR = "r8"
 
 DEPENDS = "nslu2-linksys-libs"
 
-SRC_URI = "http://nslu.sf.net/downloads/nslu2-linksys-ramdisk-2.3r63.tar.bz2 \
+SRC_URI = "http://nslu.sf.net/downloads/nslu2-linksys-ramdisk-2.3r63-2.tar.bz2 \
           file://README \
           file://NOTES \
+          file://ipkg-fl \
+          file://motd-fl \
+          file://motd-un \
           file://unsling \
           file://resling \
           file://slingover \
           file://linuxrc \
+          file://unslung.gif \
           file://nsswitch.conf \
-          file://rc.unslung-start \
-          file://rc.unslung-stop \
+          file://rc.optware-start \
+          file://rc.optware-stop \
           file://rc-diversion.patch;patch=1 \
           file://rc.1-diversion.patch;patch=1 \
           file://rc.crond-diversion.patch;patch=1 \
@@ -54,9 +58,31 @@ python () {
 do_compile () {
        echo "V2.3R63-uNSLUng-${DISTRO_VERSION}" > ${S}/.unslung
 
-       sed -i -e s/@version#/@version#-uNSLUng-${DISTRO_VERSION}/ ${S}/home/httpd/html/home.htm
+       install -m 644 ${WORKDIR}/unslung.gif ${S}/home/httpd/html/linksys.gif
+
+       sed -i -e 's/@version#</@version#-uNSLUng-'${DISTRO_VERSION}'</' ${S}/home/httpd/html/home.htm
+       sed -i -e s/@ds_sw_version#/@ds_sw_version#-uNSLUng-${DISTRO_VERSION}/ \
+               ${S}/home/httpd/html/Management/upgrade.htm
+
+       install -m 755 ${WORKDIR}/ipkg-fl ${S}/usr/bin/ipkg-fl
+       install -m 644 ${WORKDIR}/motd-fl ${S}/etc/motd-fl
+       sed -i -e s/@v@/V2.3R63-uNSLUng-${DISTRO_VERSION}/ ${S}/etc/motd-fl
+       install -m 644 ${WORKDIR}/motd-un ${S}/etc/motd-un
+       sed -i -e s/@v@/V2.3R63-uNSLUng-${DISTRO_VERSION}/ ${S}/etc/motd-un
+       rm -f ${S}/etc/motd
+       ln -s motd-fl ${S}/etc/motd
+       sed -i -e 's+@public_2#</td>+@public_2# <span class="divider"> | </span><a href="Management/telnet.cgi" class="submenu">\&nbsp; Manage Telnet</a></td>+' \
+               ${S}/home/httpd/html/home.htm
+       sed -i -e 's+<td bgcolor="#6666cc" align="right" height="33" valign="middle">&nbsp;  </td>+<td bgcolor="#6666cc" fgcolor="#ffffff" align="right" height="33" valign="middle"><center><span class=mainmenu>uNSLUng status: \&nbsp; Running from Internal Flash</span></center></td>+' \
+               ${S}/home/httpd/html/home.htm
+
        sed -i -e 's|>&nbsp;<|><a href="Unslung" class="mainmenu" target="_top">Unslung Doco</a><|' \
                ${S}/home/httpd/html/manhead.htm
+       install -d ${S}/opt/doc
+       install -m 755 ${WORKDIR}/README ${S}/opt/doc/README
+       install -m 755 ${WORKDIR}/NOTES ${S}/opt/doc/NOTES
+       rm -f ${S}/home/httpd/html/Unslung
+       ln -s /opt/doc ${S}/home/httpd/html/Unslung
 
        install -m 755 ${WORKDIR}/linuxrc ${S}/linuxrc
 
@@ -69,29 +95,16 @@ do_compile () {
        install -m 755 ${WORKDIR}/unsling ${S}/sbin/unsling
        install -m 755 ${WORKDIR}/resling ${S}/sbin/resling
        install -m 755 ${WORKDIR}/slingover ${S}/sbin/slingover
-       install -m 755 ${WORKDIR}/rc.unslung-start ${S}/etc/rc.d/rc.unslung-start
-       install -m 755 ${WORKDIR}/rc.unslung-stop ${S}/etc/rc.d/rc.unslung-stop
+       install -m 755 ${WORKDIR}/rc.optware-start ${S}/etc/rc.d/rc.optware-start
+       install -m 755 ${WORKDIR}/rc.optware-stop ${S}/etc/rc.d/rc.optware-stop
 
        install -m 644 ${WORKDIR}/nsswitch.conf ${S}/etc/nsswitch.conf
 
-       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
-
        # Add the diversion script directory
        install -d ${S}/unslung
 
        # Remove the libraries, because they are in nslu2-linksys-libs now
        rm -rf ${S}/lib
-
-       # Install upgrade mode files
-#      mv ${S}/home/httpd/html/Management/upgrade.htm ${S}/home/httpd/html/Management/upgrade-old.htm 
-#      mv ${S}/home/httpd/html/Management/upgrade.cgi ${S}/home/httpd/html/Management/upgrade-old.cgi 
-#      install -m 644 ${WORKDIR}/upgrade.htm ${S}/home/httpd/html/Management
-#      install -m 755 ${WORKDIR}/upgrade.cgi ${S}/home/httpd/html/Management
-       sed -i -e s/@ds_sw_version#/@ds_sw_version#-uNSLUng-${DISTRO_VERSION}/ \
-               ${S}/home/httpd/html/Management/upgrade.htm
 }
 
 do_install () {