summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2008-08-29 17:40:21 +0000
committerKoen Kooi <koen@openembedded.org>2008-08-29 17:40:21 +0000
commit9aabad5771b24f0da302faf9f396d73dd7166d30 (patch)
tree4e3bd8fb58c5e6d303aae1d46d3d5168ee68808c
parent1ce0638fe75c1c2f764c01cb60deb7920d6bfbea (diff)
parente688507ddf5b39b7bb900bae0c6db4d53bf8451d (diff)
merge of '05c8ac666734fffe4be207c184a8d6ec410c203f'
and 'cdd9d1c543126b02dd14925c940ec6a31e071be8'
-rw-r--r--packages/initscripts/initscripts-1.0/slugos/mountall.sh9
-rw-r--r--packages/initscripts/initscripts-slugos_1.0.bb2
-rw-r--r--packages/slugos-init/files/boot/disk14
-rw-r--r--packages/slugos-init/files/conffiles2
-rw-r--r--packages/slugos-init/files/functions1
-rw-r--r--packages/slugos-init/files/turnup23
-rw-r--r--packages/slugos-init/slugos-init_5.0.bb2
-rw-r--r--packages/udev/files/slugos/mount.sh6
-rw-r--r--packages/udev/udev_100.bb2
9 files changed, 54 insertions, 7 deletions
diff --git a/packages/initscripts/initscripts-1.0/slugos/mountall.sh b/packages/initscripts/initscripts-1.0/slugos/mountall.sh
index 94ea8217fd..3a155d155b 100644
--- a/packages/initscripts/initscripts-1.0/slugos/mountall.sh
+++ b/packages/initscripts/initscripts-1.0/slugos/mountall.sh
@@ -5,6 +5,15 @@
#
. /etc/default/rcS
+# If the right stuff exists, attempt to automatically assemble any
+# RAID devices that might be configured.
+#
+if test -x /sbin/mdadm
+then
+ test "$VERBOSE" != no && echo "Assembling RAID devices..."
+ mdadm --assemble --scan --auto=md
+fi
+
#
# Mount local filesystems in /etc/fstab. For some reason, people
# might want to mount "proc" several times, and mount -v complains
diff --git a/packages/initscripts/initscripts-slugos_1.0.bb b/packages/initscripts/initscripts-slugos_1.0.bb
index b742ad5071..18176ed4f8 100644
--- a/packages/initscripts/initscripts-slugos_1.0.bb
+++ b/packages/initscripts/initscripts-slugos_1.0.bb
@@ -16,7 +16,7 @@ RDEPENDS = ""
# All other standard definitions inherited from initscripts
# Except the PR which is hacked here. The format used is
# a suffix
-PR := "${PR}.14"
+PR := "${PR}.15"
FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/${P}', '${FILE_DIRNAME}/initscripts-${PV}', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
diff --git a/packages/slugos-init/files/boot/disk b/packages/slugos-init/files/boot/disk
index 63370ce340..34c002ba0b 100644
--- a/packages/slugos-init/files/boot/disk
+++ b/packages/slugos-init/files/boot/disk
@@ -24,9 +24,21 @@ then
# waiting for disk
if test "$sleep" -gt 0
then
- echo "Waiting $sleep seconds for disk"
+ echo "boot: waiting $sleep seconds for disk"
sleep "$sleep"
fi
+ # Attempt to assemble the RAID if necessary
+ if (echo $device | grep -q "^/dev/md")
+ then
+ if test -n "$MDUUID"
+ then
+ echo "boot: assembling RAID array (UUID)"
+ mdadm -Acpartitions --auto=md --uuid="$MDUUID" $device
+ else
+ echo "boot: assembling RAID array (config file)"
+ mdadm -As --auto=md $device
+ fi
+ fi
#
# fire the boot
echo "boot: rootfs: mount $* $device [$UUID]"
diff --git a/packages/slugos-init/files/conffiles b/packages/slugos-init/files/conffiles
index e1408a3227..668f7467a8 100644
--- a/packages/slugos-init/files/conffiles
+++ b/packages/slugos-init/files/conffiles
@@ -2,7 +2,7 @@
# Known SlugOS configuration files. These files are preserved on
# a flash upgrade. Other configuration files, found from:
#
-# /usr/lib/ipkg/*.conffiles
+# /usr/lib/opkg/*.conffiles
# /etc/*.conf
#
# are preserved too with an operation of 'diff' if they have been
diff --git a/packages/slugos-init/files/functions b/packages/slugos-init/files/functions
index 5b6b40b091..253526995f 100644
--- a/packages/slugos-init/files/functions
+++ b/packages/slugos-init/files/functions
@@ -191,6 +191,7 @@ checkmount(){
minimaldevnodes(){
[ -c "$1/dev/console" ] || mknod -m 600 "$1/dev/console" c 5 1 || return 1
[ -c "$1/dev/null" ] || mknod -m 666 "$1/dev/null" c 1 3 || return 1
+ [ -c "$1/dev/tty0" ] || mknod -m 644 "$1/dev/tty0" c 4 0 || return 1
return 0
}
#
diff --git a/packages/slugos-init/files/turnup b/packages/slugos-init/files/turnup
index 2bbc9024ef..51b801dfea 100644
--- a/packages/slugos-init/files/turnup
+++ b/packages/slugos-init/files/turnup
@@ -274,7 +274,13 @@ setup_dev() {
# /dev/null
# syslog, and maybe other things, only work if fd 1 is valid, therefore
# we must create these devices here...
- makedevs --root="$1" --devtable="$2"
+ # (if makedevs is a symlink, it's the busybox version, different syntax)
+ if [ -h /sbin/makedevs ]
+ then
+ makedevs -d "$2" "$1"
+ else
+ makedevs --root="$1" --devtable="$2"
+ fi
:>"$1"/dev/.noram
return 0
}
@@ -290,7 +296,13 @@ setup_bootdev() {
}
# NOTE: this fails silently with 0 return code(!) when a directory
# does not exist yet things are created within it.
- makedevs -r "$1" -D "$2"
+ # (if makedevs is a symlink, it's the busybox version, different syntax)
+ if [ -h /sbin/makedevs ]
+ then
+ makedevs -d "$2" "$1"
+ else
+ makedevs -r "$1" -D "$2"
+ fi
}
#
@@ -432,6 +444,7 @@ boot_rootfs() {
sleep="$3"
device="$4"
uuid=
+ mduuid=
# test this first as the test does not depend on the correctness
# of the other arguments
@@ -452,6 +465,11 @@ boot_rootfs() {
return 1
}
uuid="$3"
+ if (echo "$device" | grep -q '^/dev/md')
+ then
+ # FIXME: should use awk to do the below extraction
+ mduuid=`mdadm --detail --brief "$device" | sed 's/^.*UUID=//'`
+ fi
shift 3;;
nfs) shift 2;;
flash) ;;
@@ -493,6 +511,7 @@ boot_rootfs() {
echo 'leds beep'
test "$sleep" -gt 0 && echo -n "sleep='$sleep' "
test -n "$uuid" && echo -n "UUID='$uuid' "
+ test -n "$mduuid" && echo -n "MDUUID='$mduuid' "
echo -n "exec '/boot/$type' '$device'"
for opt in "$@"
do
diff --git a/packages/slugos-init/slugos-init_5.0.bb b/packages/slugos-init/slugos-init_5.0.bb
index 9b7c2cd8d0..4babf89d61 100644
--- a/packages/slugos-init/slugos-init_5.0.bb
+++ b/packages/slugos-init/slugos-init_5.0.bb
@@ -4,7 +4,7 @@ PRIORITY = "required"
LICENSE = "GPL"
DEPENDS = "base-files devio"
RDEPENDS = "busybox devio"
-PR = "r1.2"
+PR = "r2"
SRC_URI = "file://boot/flash \
file://boot/disk \
diff --git a/packages/udev/files/slugos/mount.sh b/packages/udev/files/slugos/mount.sh
index 11714c1390..0990a7e85a 100644
--- a/packages/udev/files/slugos/mount.sh
+++ b/packages/udev/files/slugos/mount.sh
@@ -10,6 +10,12 @@ PMOUNT="/usr/bin/pmount"
UMOUNT="/bin/umount"
name="`basename "$DEVNAME"`"
+if ( blkid "$DEVNAME" | grep -q 'TYPE="mdraid"' )
+then
+ logger "udev/mount.sh" "[$DEVNAME] is a member of an array, ignoring"
+ exit 0
+fi
+
for line in `cat /etc/udev/mount.blacklist | grep -v ^#`
do
if ( echo "$DEVNAME" | grep -q "$line" )
diff --git a/packages/udev/udev_100.bb b/packages/udev/udev_100.bb
index c8840e1a8f..1cd3c41e82 100644
--- a/packages/udev/udev_100.bb
+++ b/packages/udev/udev_100.bb
@@ -9,7 +9,7 @@ used to detect the type of a file system and read its metadata."
DESCRIPTION_libvolume-id-dev = "libvolume_id development headers, \
needed to link programs with libvolume_id."
-PR = "r11"
+PR = "r12"
SRC_URI = "${KERNELORG_MIRROR}/pub/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \
file://noasmlinkage.patch;patch=1 \