[oe-commits] org.oe.dev Unslung: rootfs - fixed permissions on /root for ssh, add control flag for rc.bootdisk

mwester commit openembedded-commits at lists.openembedded.org
Wed Nov 15 01:05:30 UTC 2006


Unslung: rootfs - fixed permissions on /root for ssh, add control flag for rc.bootdisk

Author: mwester at openembedded.org
Branch: org.openembedded.dev
Revision: 3bebc77134894dd40e010ff3b797313fedecf370
ViewMTN: http://monotone.openembedded.org/revision.psp?id=3bebc77134894dd40e010ff3b797313fedecf370
Files:
1
packages/nslu2-binary-only/unslung-rootfs/rc.bootdisk
packages/nslu2-binary-only/unslung-rootfs_2.3r63.bb
Diffs:

#
# mt diff -rdc2bb99b6e462a9efa7c516af62c54aeb9f740fa -r3bebc77134894dd40e010ff3b797313fedecf370
#
# 
# 
# patch "packages/nslu2-binary-only/unslung-rootfs/rc.bootdisk"
#  from [7dbd76151b9291d2c938cff55a3d347273a1320e]
#    to [0c88d76777c2b98c35697417518d00f0065fdfcb]
# 
# patch "packages/nslu2-binary-only/unslung-rootfs_2.3r63.bb"
#  from [b6544af86d48626e2e00d18ccab20b9c65d04e8f]
#    to [3fa65c52609c743a3902240d2cb6da9a98f8de52]
# 
============================================================
--- packages/nslu2-binary-only/unslung-rootfs/rc.bootdisk	7dbd76151b9291d2c938cff55a3d347273a1320e
+++ packages/nslu2-binary-only/unslung-rootfs/rc.bootdisk	0c88d76777c2b98c35697417518d00f0065fdfcb
@@ -1,5 +1,8 @@
 #!/bin/sh
 
+# If the nobootdisk flag is set, exit.
+if ( [ -f /.nobootdisk ] ) ; then return 0 ; fi
+
 # If we're not booting from flash, exit.
 i=`grep "/dev/root / jffs2" /proc/mounts`
 if ( [ -z "$i" ] ) ; then return 0 ; fi
@@ -12,30 +15,56 @@ if ( [ "$linksys_hostname" = `hostname` 
 
 # but don't duplicate
 if ( [ "$linksys_hostname" = `hostname` ] ) ; then linksys_hostname= ; fi
-if ( [ "$real_hostname" = "unslung" ] ) ; then real_hostname= ; fi
+if ( [ "$real_hostname" = "default" ] ) ; then real_hostname= ; fi
 
 # Search all FAT/NTFS filesystem in order.
 # (heavily borrowed from the rc.start-optware script).
+
 for i in /share/*/data/HDD_* ; do
+
+  # if the value of i is the string with the wildcards, no match occurred.
   if ( [ "$i" = '/share/*/data/HDD_*' ] ) ; then break ; fi
+
   echo "====> searching $i..."
-  for j in $linksys_hostname $real_hostname "unslung" ; do
+
+  # Now check inside directories named for the Linksys hostname, the real
+  # hostname, and finally the name "default"...
+  for j in $linksys_hostname $real_hostname "default" ; do
+
     echo "====> checking $i/bootdisk/$j ..."
-    if ( [ -d "$i"/bootdisk/"$j" ] ) ; then
-      for k in "$i"/bootdisk/"$j"/S??* ; do
+    if ( [ -d "$i/bootdisk/$j" ] ) ; then
+
+      # We have the correct subdirectory...
+      for k in "$i/bootdisk/$j"/S??* ; do
+
+        # Bail out if no match in that directory
+        if ( [ "$k" = "$i/bootdisk/$j"'/S??*' ] ) ; then break ; fi
+
         echo "====> found $k ..."
         [ ! -f "$k" ] && continue
-	nocopy=`grep "^#unslung-nocopy" "$k"`
+
+	# Check to see if we need to copy or run in-place..
+	nocopy=`grep "^#bootdisk:nocopy" "$k"`
         if ( [ -z "$nocopy" ] ) ; then
+
+	  # copy and strip the MSDOS-style line endings, then execute.
           echo "====> running copy: /tmp/tmpscript $k $i"
           dos2unix -u <"$k" >/tmp/tmpscript
           /bin/sh /tmp/tmpscript "$k" "$i"
           rm -f   /tmp/tmpscript
+
         else
+
+	  # execute in place
           echo "====> running in-place $k $k $i"
           /bin/sh "$k" "$k" "$i"
+
         fi
+
       done
+
     fi
+
   done
+
 done
============================================================
--- packages/nslu2-binary-only/unslung-rootfs_2.3r63.bb	b6544af86d48626e2e00d18ccab20b9c65d04e8f
+++ packages/nslu2-binary-only/unslung-rootfs_2.3r63.bb	3fa65c52609c743a3902240d2cb6da9a98f8de52
@@ -1,7 +1,7 @@ COMPATIBLE_MACHINE = "nslu2"
 SECTION = "base"
 COMPATIBLE_MACHINE = "nslu2"
 
-PR = "r17"
+PR = "r18"
 
 DEPENDS = "nslu2-linksys-libs nslu2-linksys-sambacodepages"
 
@@ -165,7 +165,7 @@ do_compile () {
 
 	# No reason not to have a home directory for root...
 	mkdir -p ${S}/root
-	chmod 775 ${S}/root
+	chmod 755 ${S}/root
 }
 
 do_install () {






More information about the Openembedded-commits mailing list