All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/31] Some dracut cleanups and bashification.
@ 2009-02-09  0:34 Victor Lowther
       [not found] ` <5a1ca330d81aeebf879bb7f0950b7ae448f7be22.1234137267.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 39+ messages in thread
From: Victor Lowther @ 2009-02-09  0:34 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA

Hi, I enjoy hacking on system infrastructure and am a bash programming 
aficionado. With that in mind, I present this patch series against current
master -- it simplifies several bits of code and shaves about 200 lines out
of the codebase.  The final result has been tested on a Fedora 10 box that
uses lvm on top of dm-crypt, and it works fine.  I have not tested all
intermediate steps -- life is too short.

Comments, flames, commit access to the repo welcome.

These patches are also availble at http://git.fnordovax.org/dracut/ 

We have a path.  Do not specify full paths to commands that are in it.

---
 init |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/init b/init
index 706127f..eb8998d 100755
--- a/init
+++ b/init
@@ -7,18 +7,18 @@
 
 emergency_shell()
 {
-    [ -x /bin/plymouth ] && /bin/plymouth --hide-splash
+    [ -x /bin/plymouth ] && plymouth --hide-splash
     echo ; echo
     echo "Bug in initramfs /init detected. Dropping to a shell. Good luck!"
     echo
     bash < /dev/console
 }
-trap "emergency_shell" 0 2
 
 echo "Starting initrd..."
 export PATH=/sbin:/bin:/usr/sbin:/usr/bin
 export TERM=linux
 
+trap "emergency_shell" 0 2
 # /dev/console comes from the built-in initramfs crud in the kernel
 # someday, we may need to mkdir /dev first here
 exec > /dev/console 2>&1 < /dev/console
@@ -38,13 +38,13 @@ mknod /dev/tty1 c 4 1
 
 # start plymouth if it's available
 # arguably we need some of udev run first for fbmods and above devnodes :/
-[ -x /bin/plymouthd ] && /bin/plymouthd --attach-to-session
-[ -x /bin/plymouth ] && /bin/plymouth --show-splash
+[ -x /bin/plymouthd ] && plymouthd --attach-to-session
+[ -x /bin/plymouth ] && plymouth --show-splash
 
 
 # start up udev and trigger cold plugs
-/sbin/udevd --daemon
-/sbin/udevadm trigger
+udevd --daemon
+udevadm trigger
 
 # mount the rootfs
 NEWROOT="/sysroot"
@@ -108,10 +108,10 @@ fi
 # kill off udev
 kill `pidof udevd`
 
-[ -x /bin/plymouth ] && /bin/plymouth --newroot=$NEWROOT
+[ -x /bin/plymouth ] && plymouth --newroot=$NEWROOT
 
 # FIXME: nash die die die
-exec /sbin/switch_root
+exec switch_root
 # davej doesn't like initrd bugs
 echo "Something went very badly wrong in the initrd.  Please "
 echo "file a bug against mkinitrd."
-- 
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 02/31] Some dracut cleanups and bashification.
       [not found] ` <5a1ca330d81aeebf879bb7f0950b7ae448f7be22.1234137267.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2009-02-09  0:34   ` Victor Lowther
  2009-02-09  0:34   ` [PATCH 03/31] " Victor Lowther
                     ` (29 subsequent siblings)
  30 siblings, 0 replies; 39+ messages in thread
From: Victor Lowther @ 2009-02-09  0:34 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA

Add a simple getarg function.

If we ever need to get more than one kernel command line argument, this
function will pay for itself.  It relies on a feature of the way bash
handles string comparisons in [[ ]] statements -- the RHS is matched
according to globbing rules, and is not a straight string match.
---
 init |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/init b/init
index eb8998d..b5b0b1b 100755
--- a/init
+++ b/init
@@ -14,6 +14,12 @@ emergency_shell()
     bash < /dev/console
 }
 
+getarg() {
+    for o in $(< /proc/cmdline); do
+	[[ $o == $1 ]] && { echo $o; break; }
+    done
+}
+
 echo "Starting initrd..."
 export PATH=/sbin:/bin:/usr/sbin:/usr/bin
 export TERM=linux
-- 
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 03/31] Some dracut cleanups and bashification.
       [not found] ` <5a1ca330d81aeebf879bb7f0950b7ae448f7be22.1234137267.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2009-02-09  0:34   ` [PATCH 02/31] " Victor Lowther
@ 2009-02-09  0:34   ` Victor Lowther
  2009-02-09  0:34   ` [PATCH 04/31] " Victor Lowther
                     ` (28 subsequent siblings)
  30 siblings, 0 replies; 39+ messages in thread
From: Victor Lowther @ 2009-02-09  0:34 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA

Use getarg to get the root kernel commandline parameter.

---
 init |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/init b/init
index b5b0b1b..7b2a985 100755
--- a/init
+++ b/init
@@ -58,13 +58,8 @@ NEWROOT="/sysroot"
 # FIXME: there's got to be a better way ...
 # it'd be nice if we had a udev rule that just did all of the bits for
 # figuring out what the specified root is and linking it /dev/root
-for o in `cat /proc/cmdline` ; do
-  case $o in 
-  root=*)
-    root=${o#root=}
-    ;;
-  esac
-done
+root=$(getarg 'root=*'); root=${root#root=}
+
 echo -n "Going to mount rootfs ($root)"
 if [ -z "$root" ]; then 
   echo "Warning: no root specified"
-- 
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 04/31] Some dracut cleanups and bashification.
       [not found] ` <5a1ca330d81aeebf879bb7f0950b7ae448f7be22.1234137267.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2009-02-09  0:34   ` [PATCH 02/31] " Victor Lowther
  2009-02-09  0:34   ` [PATCH 03/31] " Victor Lowther
@ 2009-02-09  0:34   ` Victor Lowther
  2009-02-09  0:35   ` [PATCH 05/31] " Victor Lowther
                     ` (27 subsequent siblings)
  30 siblings, 0 replies; 39+ messages in thread
From: Victor Lowther @ 2009-02-09  0:34 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA

Modify root cmdline parsing to use a case statement.

This code takes less space and is easier to read at a glance.
---
 init |   21 +++++++++------------
 1 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/init b/init
index 7b2a985..78f962e 100755
--- a/init
+++ b/init
@@ -59,19 +59,16 @@ NEWROOT="/sysroot"
 # it'd be nice if we had a udev rule that just did all of the bits for
 # figuring out what the specified root is and linking it /dev/root
 root=$(getarg 'root=*'); root=${root#root=}
-
 echo -n "Going to mount rootfs ($root)"
-if [ -z "$root" ]; then 
-  echo "Warning: no root specified"
-  root="/dev/sda1"
-elif [ "${root#LABEL=}" != $root ]; then
-  # FIXME: may need to do more escaping here
-  l=${root#LABEL=}
-  label=${l//\//\\x2f}
-  root="/dev/disk/by-label/${label}"
-elif [ "${root#UUID=}" != $root ]; then
-  root="/dev/disk/by-uuid/${root#UUID=}"
-fi
+case $root in
+    LABEL=*) root=${root#LABEL=}
+             root=${root//\//\\x2f}
+	     root="/dev/disk/by-label/${root}" ;;
+    UUID=*) root="/dev/disk/by-uuid/${root#UUID=}" ;;
+    '') echo "Warning: no root specified"
+	root="/dev/sda1" ;;
+esac
+
 # should we have a timeout?
 tries=0
 while [ ! -e $root ]; do
-- 
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 05/31] Some dracut cleanups and bashification.
       [not found] ` <5a1ca330d81aeebf879bb7f0950b7ae448f7be22.1234137267.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
                     ` (2 preceding siblings ...)
  2009-02-09  0:34   ` [PATCH 04/31] " Victor Lowther
@ 2009-02-09  0:35   ` Victor Lowther
  2009-02-09  0:35   ` [PATCH 06/31] " Victor Lowther
                     ` (26 subsequent siblings)
  30 siblings, 0 replies; 39+ messages in thread
From: Victor Lowther @ 2009-02-09  0:35 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA

Rewrite the mount loop using bash-specific features.

This makes the loop slightly more compact and easier to read.
---
 init |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/init b/init
index 78f962e..2ebf1b0 100755
--- a/init
+++ b/init
@@ -71,13 +71,10 @@ esac
 
 # should we have a timeout?
 tries=0
-while [ ! -e $root ]; do
+until [[ -e $root ]]; do
   echo -n "."
   sleep 1
-  tries=$(($tries + 1))
-  if [ $tries -gt 30 ]; then
-      emergency_shell
-  fi
+  ((tries++ > 30)) && emergency_shell
 done
 echo -e "\n\nMounting rootfs after $tries seconds"
 ln -s "$root" /dev/root    
-- 
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 06/31] Some dracut cleanups and bashification.
       [not found] ` <5a1ca330d81aeebf879bb7f0950b7ae448f7be22.1234137267.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
                     ` (3 preceding siblings ...)
  2009-02-09  0:35   ` [PATCH 05/31] " Victor Lowther
@ 2009-02-09  0:35   ` Victor Lowther
  2009-02-09  0:35   ` [PATCH 07/31] " Victor Lowther
                     ` (25 subsequent siblings)
  30 siblings, 0 replies; 39+ messages in thread
From: Victor Lowther @ 2009-02-09  0:35 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA

Bashify results testing for selinux policy loading

---
 init |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/init b/init
index 2ebf1b0..2b7aa36 100755
--- a/init
+++ b/init
@@ -92,7 +92,7 @@ mount -t sysfs /sys $NEWROOT/sys
 # FIXME: load selinux policy.  this should really be done after we switchroot 
 if [ -x $NEWROOT/usr/sbin/load_policy ]; then
   chroot $NEWROOT /usr/sbin/load_policy -i
-  if [ $? -eq 3 ]; then
+  if (($? == 3)); then
     echo "Initial SELinux policy load failed and enforcing mode requested."
     echo "Not continuing"
     sleep 100d
-- 
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 07/31] Some dracut cleanups and bashification.
       [not found] ` <5a1ca330d81aeebf879bb7f0950b7ae448f7be22.1234137267.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
                     ` (4 preceding siblings ...)
  2009-02-09  0:35   ` [PATCH 06/31] " Victor Lowther
@ 2009-02-09  0:35   ` Victor Lowther
  2009-02-09  0:35   ` [PATCH 08/31] " Victor Lowther
                     ` (24 subsequent siblings)
  30 siblings, 0 replies; 39+ messages in thread
From: Victor Lowther @ 2009-02-09  0:35 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA

Get rid of `` subprocess expansion when killing udevd.

$() subprocess expansion is so much easier to read.
---
 init |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/init b/init
index 2b7aa36..599f8ad 100755
--- a/init
+++ b/init
@@ -101,7 +101,7 @@ if [ -x $NEWROOT/usr/sbin/load_policy ]; then
 fi
 
 # kill off udev
-kill `pidof udevd`
+kill $(pidof udevd)
 
 [ -x /bin/plymouth ] && plymouth --newroot=$NEWROOT
 
-- 
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 08/31] Some dracut cleanups and bashification.
       [not found] ` <5a1ca330d81aeebf879bb7f0950b7ae448f7be22.1234137267.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
                     ` (5 preceding siblings ...)
  2009-02-09  0:35   ` [PATCH 07/31] " Victor Lowther
@ 2009-02-09  0:35   ` Victor Lowther
  2009-02-09  0:35   ` [PATCH 09/31] " Victor Lowther
                     ` (23 subsequent siblings)
  30 siblings, 0 replies; 39+ messages in thread
From: Victor Lowther @ 2009-02-09  0:35 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA

Don't load commands into the initrd that are built in to bash.

No sense in loading commands that will never be used.
---
 dracut |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/dracut b/dracut
index ef2ca42..0fe0282 100755
--- a/dracut
+++ b/dracut
@@ -4,6 +4,7 @@
 # Tries to retain some degree of compatibility with the command line
 # of the various mkinitrd implementations out there
 #
+
 # Copyright 2008, Red Hat, Inc.  Jeremy Katz <katzj-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
 # GPLv2 header here
 
@@ -66,7 +67,7 @@ fi
 initdir=$(mktemp -d -t initramfs.XXXXXX)
 
 # executables that we have to have
-exe="/bin/bash /bin/mount /bin/mknod /bin/mkdir /sbin/modprobe /sbin/udevd /sbin/udevadm /sbin/nash /bin/kill /sbin/pidof /bin/sleep /bin/echo /usr/sbin/chroot"
+exe="/bin/bash /bin/mount /bin/mknod /bin/mkdir /sbin/modprobe /sbin/udevd /sbin/udevadm /sbin/nash /sbin/pidof /bin/sleep /usr/sbin/chroot"
 lvmexe="/sbin/lvm"
 cryptexe="/sbin/cryptsetup"
 # and some things that are nice for debugging
-- 
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 09/31] Some dracut cleanups and bashification.
       [not found] ` <5a1ca330d81aeebf879bb7f0950b7ae448f7be22.1234137267.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
                     ` (6 preceding siblings ...)
  2009-02-09  0:35   ` [PATCH 08/31] " Victor Lowther
@ 2009-02-09  0:35   ` Victor Lowther
  2009-02-09  0:35   ` [PATCH 10/31] " Victor Lowther
                     ` (22 subsequent siblings)
  30 siblings, 0 replies; 39+ messages in thread
From: Victor Lowther @ 2009-02-09  0:35 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA

Compact option processing.

Most of the options are one-liners, and the shift can be factored out of
the case expression entirely.
---
 dracut |   31 +++++++++----------------------
 1 files changed, 9 insertions(+), 22 deletions(-)

diff --git a/dracut b/dracut
index 0fe0282..82cf9e5 100755
--- a/dracut
+++ b/dracut
@@ -10,30 +10,17 @@
 
 [ -f /etc/dracut.conf ] && . /etc/dracut.conf
 
-while [ $# -gt 0 ]; do
+while (($# > 0)); do
     case $1 in
-	-f|--force)
-	    force=yes
-	    shift
-	    ;;
-	-h|--help)
-	    echo "Usage: $0 [-f] <initramfs> <kernel-version>"
-	    exit 1
-	    ;;
-	-v|--verbose)
-	    set -x
-	    shift
-	    ;;
-	-l|--local)
-	    allowlocal="yes"
-	    shift
-	    ;;
-	--allow-missing)
-	    shift
-	    ;;
-	*)
-	    break
+	-f|--force) force=yes;;
+	-h|--help) echo "Usage: $0 [-f] <initramfs> <kernel-version>"
+	    exit 1 ;;
+	-v|--verbose) set -x;;
+	-l|--local) allowlocal="yes" ;;
+	--allow-missing) : ;;
+	*) break ;;
     esac
+    shift
 done
 
 if [ -n "$2" ]; then
-- 
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 10/31] Some dracut cleanups and bashification.
       [not found] ` <5a1ca330d81aeebf879bb7f0950b7ae448f7be22.1234137267.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
                     ` (7 preceding siblings ...)
  2009-02-09  0:35   ` [PATCH 09/31] " Victor Lowther
@ 2009-02-09  0:35   ` Victor Lowther
  2009-02-09  0:35   ` [PATCH 11/31] " Victor Lowther
                     ` (21 subsequent siblings)
  30 siblings, 0 replies; 39+ messages in thread
From: Victor Lowther @ 2009-02-09  0:35 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA

Clean up initialization in dracut.

The source keyword is deprecated, and kernel / outfile are more legible as
conditional lists.
---
 dracut |   19 ++++++-------------
 1 files changed, 6 insertions(+), 13 deletions(-)

diff --git a/dracut b/dracut
index 82cf9e5..bd592d0 100755
--- a/dracut
+++ b/dracut
@@ -23,29 +23,22 @@ while (($# > 0)); do
     shift
 done
 
-if [ -n "$2" ]; then
-    kernel=$2
-else
-    kernel=$(uname -r)
-fi
-if [ -n "$1" ]; then
-    outfile=$(readlink -f $1)
-else
+[[ $2 ]] && kernel=$2 || kernel=$(uname -r)
+[[ $1 ]] && outfile=$(readlink -f $1) || \
     outfile="/boot/initrd-$kernel.img"
-fi
 
-if [ -f "$outfile" -a  -z "$force" ]; then
+if [[ -f $outfile && ! $force ]]; then
     echo "Will not override existing initramfs ($outfile) without --force"
     exit 1
 fi
 
-if [ -n "$allowlocal" -a -f ./init ]; then
-    source ./dracut-functions
+if [[ $allowlocal && -f ./init ]]; then
+    . ./dracut-functions
     initfile=./init
     switchroot=./switch_root
     rulesdir=./rules.d
 else
-    source /usr/libexec/dracut/functions
+    . /usr/libexec/dracut/functions
     initfile=/usr/libexec/dracut/init
     switchroot=/usr/libexec/dracut/switch_root
     rulesdir=/usr/libexec/dracut/rules.d
-- 
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 11/31] Some dracut cleanups and bashification.
       [not found] ` <5a1ca330d81aeebf879bb7f0950b7ae448f7be22.1234137267.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
                     ` (8 preceding siblings ...)
  2009-02-09  0:35   ` [PATCH 10/31] " Victor Lowther
@ 2009-02-09  0:35   ` Victor Lowther
  2009-02-09  0:35   ` [PATCH 12/31] " Victor Lowther
                     ` (20 subsequent siblings)
  30 siblings, 0 replies; 39+ messages in thread
From: Victor Lowther @ 2009-02-09  0:35 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA

Quote variable expansion where needed.

Otherwise, spaces in some filenames may make things interesting some fine day.
---
 dracut |   25 ++++++++++++-------------
 1 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/dracut b/dracut
index bd592d0..7ba4a09 100755
--- a/dracut
+++ b/dracut
@@ -57,7 +57,7 @@ udevexe="/lib/udev/vol_id /lib/udev/console_init"
 
 # install base files
 for binary in $exe $debugexe $udevexe $lvmexe $cryptexe ; do
-  inst $binary $initdir
+  inst $binary "$initdir"
 done
 
 # FIXME: would be nice if we didn't have to know which rules to grab....
@@ -65,7 +65,7 @@ done
 # of the rules we want so that we just copy those in would be best
 mkdir -p $initdir/lib/udev/rules.d
 for rule in /lib/udev/rules.d/10-console* /lib/udev/rules.d/40-redhat* /lib/udev/rules.d/50* /lib/udev/rules.d/60-persistent-storage.rules /lib/udev/rules.d/61*edd* /lib/udev/rules.d/64* /lib/udev/rules.d/80* /lib/udev/rules.d/95* $rulesdir/*.rules ; do
-  cp $rule $initdir/lib/udev/rules.d
+  cp "$rule" "$initdir/lib/udev/rules.d"
 done
 
 # terminfo bits make things work better if you fall into interactive mode
@@ -107,8 +107,8 @@ if [ -f /etc/sysconfig/i18n ]; then
     inst /bin/setfont "$initdir"
 
     for FN in /lib/kbd/consolefonts/$SYSFONT.* ; do
-        inst $FN "$initdir"
-        case "$FN" in
+        inst "$FN" "$initdir"
+        case $FN in
             *.gz)
                 gzip -d "$MNTIMAGE$FN"
                 ;;
@@ -126,22 +126,21 @@ if [ -f /etc/sysconfig/i18n ]; then
 fi
 
 # install our files
-cp $initfile $initdir/init
-cp $switchroot $initdir/sbin/switch_root
+cp $initfile "$initdir/init"
+cp $switchroot "$initdir/sbin/switch_root"
 
 # and create some directory structure
-mkdir -p $initdir/etc $initdir/proc $initdir/sys $initdir/sysroot $initdir/dev/pts
-
+for d in etc proc sys sysroot dev/pts; do mkdir -p "$initdir/$d"; done
 # FIXME: hard-coded module list of doom.
 [ -z "$modules" ] && modules="=ata =block =drm dm-crypt aes sha256 cbc"
 
-mkdir -p $initdir/lib/modules/$kernel
+mkdir -p "$initdir/lib/modules/$kernel"
 # expand out module deps, etc
 for mod in $(resolveAndExpandModules $modules) ; do
-    installmodule $mod $initdir
+    installmodule $mod "$initdir"
 done
 
-/sbin/depmod -a -b $initdir $kernel
+/sbin/depmod -a -b "$initdir" $kernel
 if [ $? -ne 0 ]; then
     error "\"/sbin/depmod -a $kernel\" failed."
     exit 1
@@ -152,6 +151,6 @@ if [ -x /usr/libexec/plymouth/plymouth-populate-initrd ]; then
     /usr/libexec/plymouth/plymouth-populate-initrd -t "$initdir" || :
 fi
 
-pushd $initdir >/dev/null
-find . |cpio -H newc -o |gzip -9 > $outfile
+pushd "$initdir" >/dev/null
+find . |cpio -H newc -o |gzip -9 > "$outfile"
 popd >/dev/null
-- 
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 12/31] Some dracut cleanups and bashification.
       [not found] ` <5a1ca330d81aeebf879bb7f0950b7ae448f7be22.1234137267.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
                     ` (9 preceding siblings ...)
  2009-02-09  0:35   ` [PATCH 11/31] " Victor Lowther
@ 2009-02-09  0:35   ` Victor Lowther
  2009-02-09  0:35   ` [PATCH 13/31] " Victor Lowther
                     ` (19 subsequent siblings)
  30 siblings, 0 replies; 39+ messages in thread
From: Victor Lowther @ 2009-02-09  0:35 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA

Get rid of some redundancy when sourcing our functions.

---
 dracut |   16 +++++-----------
 1 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/dracut b/dracut
index 7ba4a09..c333173 100755
--- a/dracut
+++ b/dracut
@@ -32,17 +32,11 @@ if [[ -f $outfile && ! $force ]]; then
     exit 1
 fi
 
-if [[ $allowlocal && -f ./init ]]; then
-    . ./dracut-functions
-    initfile=./init
-    switchroot=./switch_root
-    rulesdir=./rules.d
-else
-    . /usr/libexec/dracut/functions
-    initfile=/usr/libexec/dracut/init
-    switchroot=/usr/libexec/dracut/switch_root
-    rulesdir=/usr/libexec/dracut/rules.d
-fi
+[[ $allowlocal && -f ./init ]] && dsrc="." || dsrc=/usr/libexec/dracut
+. $dsrc/dracut-functions
+initfile=$dsrc/init
+switchroot=$dsrc/switch_root
+rulesdir=$dsrc/rules.d
 
 initdir=$(mktemp -d -t initramfs.XXXXXX)
 
-- 
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 13/31] Some dracut cleanups and bashification.
       [not found] ` <5a1ca330d81aeebf879bb7f0950b7ae448f7be22.1234137267.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
                     ` (10 preceding siblings ...)
  2009-02-09  0:35   ` [PATCH 12/31] " Victor Lowther
@ 2009-02-09  0:35   ` Victor Lowther
  2009-02-09  0:35   ` [PATCH 14/31] " Victor Lowther
                     ` (18 subsequent siblings)
  30 siblings, 0 replies; 39+ messages in thread
From: Victor Lowther @ 2009-02-09  0:35 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA

Missed an instance of $initdir not being quoted.

---
 dracut |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dracut b/dracut
index c333173..9de5bea 100755
--- a/dracut
+++ b/dracut
@@ -57,7 +57,7 @@ done
 # FIXME: would be nice if we didn't have to know which rules to grab....
 # ultimately, /lib/initramfs/rules.d or somesuch which includes links/copies
 # of the rules we want so that we just copy those in would be best
-mkdir -p $initdir/lib/udev/rules.d
+mkdir -p "$initdir/lib/udev/rules.d"
 for rule in /lib/udev/rules.d/10-console* /lib/udev/rules.d/40-redhat* /lib/udev/rules.d/50* /lib/udev/rules.d/60-persistent-storage.rules /lib/udev/rules.d/61*edd* /lib/udev/rules.d/64* /lib/udev/rules.d/80* /lib/udev/rules.d/95* $rulesdir/*.rules ; do
   cp "$rule" "$initdir/lib/udev/rules.d"
 done
-- 
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 14/31] Some dracut cleanups and bashification.
       [not found] ` <5a1ca330d81aeebf879bb7f0950b7ae448f7be22.1234137267.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
                     ` (11 preceding siblings ...)
  2009-02-09  0:35   ` [PATCH 13/31] " Victor Lowther
@ 2009-02-09  0:35   ` Victor Lowther
  2009-02-09  0:35   ` [PATCH 15/31] " Victor Lowther
                     ` (17 subsequent siblings)
  30 siblings, 0 replies; 39+ messages in thread
From: Victor Lowther @ 2009-02-09  0:35 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA

Tighten up conditional checking a bit more.

Use bash-style conditionals where ever it makes things shorter
and easier to read.
---
 dracut |   29 ++++++++++-------------------
 1 files changed, 10 insertions(+), 19 deletions(-)

diff --git a/dracut b/dracut
index 9de5bea..8cbe0da 100755
--- a/dracut
+++ b/dracut
@@ -66,16 +66,14 @@ done
 for f in $(find /lib/terminfo -type f) ; do cp  --parents $f "$initdir" ; done
 
 # FIXME: i18n stuff isn't really distro-independent :/
-if [ -f /etc/sysconfig/keyboard ] || [ -f /etc/sysconfig/console/default.kmap ]; then
+if [[ -f /etc/sysconfig/keyboard || -f /etc/sysconfig/console/default.kmap ]]; then
     if [ -f /etc/sysconfig/console/default.kmap ]; then
         KEYMAP=/etc/sysconfig/console/default.kmap
     else
         . /etc/sysconfig/keyboard
-        if [ -n "$KEYTABLE" -a -d "/lib/kbd/keymaps" ]; then
-            KEYMAP="$KEYTABLE.map"
-        fi
+        [[ $KEYTABLE && -d /lib/kbd/keymaps ]] && KEYMAP="$KEYTABLE.map"
     fi
-    if [ -n "$KEYMAP" ]; then
+    if [[ $KEYMAP ]]; then
         [ -f /etc/sysconfig/keyboard ] && inst /etc/sysconfig/keyboard "$initdir"
         inst /bin/loadkeys "$initdir"
         findkeymap $KEYMAP
@@ -97,7 +95,7 @@ fi
 if [ -f /etc/sysconfig/i18n ]; then
     . /etc/sysconfig/i18n
     inst /etc/sysconfig/i18n "$initdir"
-    [ -z "$SYSFONT" ] && SYSFONT=latarcyrheb-sun16
+    [[ $SYSFONT ]] || SYSFONT=latarcyrheb-sun16
     inst /bin/setfont "$initdir"
 
     for FN in /lib/kbd/consolefonts/$SYSFONT.* ; do
@@ -111,12 +109,8 @@ if [ -f /etc/sysconfig/i18n ]; then
                 ;;
         esac
     done
-    if [ -n "$SYSFONTACM" ]; then
-        inst /lib/kbd/consoletrans/$SYSFONTACM "$initdir"
-    fi
-    if [ -n "$UNIMAP" ]; then
-        inst /lib/kbd/unimaps/$UNIMAP "$initdir"
-    fi
+    [[ $SYSFONTACM ]] && inst /lib/kbd/consoletrans/$SYSFONTACM "$initdir"
+    [[ $UNIMAP ]] && inst /lib/kbd/unimaps/$UNIMAP "$initdir"
 fi
 
 # install our files
@@ -126,7 +120,7 @@ cp $switchroot "$initdir/sbin/switch_root"
 # and create some directory structure
 for d in etc proc sys sysroot dev/pts; do mkdir -p "$initdir/$d"; done
 # FIXME: hard-coded module list of doom.
-[ -z "$modules" ] && modules="=ata =block =drm dm-crypt aes sha256 cbc"
+[[ $modules ]] || modules="=ata =block =drm dm-crypt aes sha256 cbc"
 
 mkdir -p "$initdir/lib/modules/$kernel"
 # expand out module deps, etc
@@ -134,17 +128,14 @@ for mod in $(resolveAndExpandModules $modules) ; do
     installmodule $mod "$initdir"
 done
 
-/sbin/depmod -a -b "$initdir" $kernel
-if [ $? -ne 0 ]; then
+/sbin/depmod -a -b "$initdir" $kernel || {
     error "\"/sbin/depmod -a $kernel\" failed."
     exit 1
-fi
+}
 
 # plymouth
 if [ -x /usr/libexec/plymouth/plymouth-populate-initrd ]; then
     /usr/libexec/plymouth/plymouth-populate-initrd -t "$initdir" || :
 fi
 
-pushd "$initdir" >/dev/null
-find . |cpio -H newc -o |gzip -9 > "$outfile"
-popd >/dev/null
+( cd "$initdir"; find . |cpio -H newc -o |gzip -9 > "$outfile"; )
-- 
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 15/31]  Some dracut cleanups and bashification.
       [not found] ` <5a1ca330d81aeebf879bb7f0950b7ae448f7be22.1234137267.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
                     ` (12 preceding siblings ...)
  2009-02-09  0:35   ` [PATCH 14/31] " Victor Lowther
@ 2009-02-09  0:35   ` Victor Lowther
  2009-02-09  0:35   ` [PATCH 16/31] " Victor Lowther
                     ` (16 subsequent siblings)
  30 siblings, 0 replies; 39+ messages in thread
From: Victor Lowther @ 2009-02-09  0:35 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA

Tighten up the keymap installation case statement in dracut.

---
 dracut |   10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/dracut b/dracut
index 8cbe0da..13c254f 100755
--- a/dracut
+++ b/dracut
@@ -80,13 +80,9 @@ if [[ -f /etc/sysconfig/keyboard || -f /etc/sysconfig/console/default.kmap ]]; t
 
         for FN in $KEYMAPS; do
             inst $FN "$initdir"
-            case "$FN" in
-                *.gz)
-                    gzip -d "$initdir$FN"
-                    ;;
-                *.bz2)
-                    bzip2 -d "$initdir$FN"
-                    ;;
+            case $FN in
+                *.gz) gzip -d "$initdir$FN" ;;
+                *.bz2) bzip2 -d "$initdir$FN" ;;
             esac
         done
     fi
-- 
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 16/31] Some dracut cleanups and bashification.
       [not found] ` <5a1ca330d81aeebf879bb7f0950b7ae448f7be22.1234137267.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
                     ` (13 preceding siblings ...)
  2009-02-09  0:35   ` [PATCH 15/31] " Victor Lowther
@ 2009-02-09  0:35   ` Victor Lowther
  2009-02-09  0:35   ` [PATCH 17/31] " Victor Lowther
                     ` (15 subsequent siblings)
  30 siblings, 0 replies; 39+ messages in thread
From: Victor Lowther @ 2009-02-09  0:35 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA

$MNTIMAGE?  I thought the install dir was $initdir.

---
 dracut |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dracut b/dracut
index 13c254f..a19f910 100755
--- a/dracut
+++ b/dracut
@@ -98,10 +98,10 @@ if [ -f /etc/sysconfig/i18n ]; then
         inst "$FN" "$initdir"
         case $FN in
             *.gz)
-                gzip -d "$MNTIMAGE$FN"
+                gzip -d "$initdir$FN"
                 ;;
             *.bz2)
-                bzip2 -d "$MNTIMAGE$FN"
+                bzip2 -d "$initdir$FN"
                 ;;
         esac
     done
-- 
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 17/31] Some dracut cleanups and bashification.
       [not found] ` <5a1ca330d81aeebf879bb7f0950b7ae448f7be22.1234137267.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
                     ` (14 preceding siblings ...)
  2009-02-09  0:35   ` [PATCH 16/31] " Victor Lowther
@ 2009-02-09  0:35   ` Victor Lowther
  2009-02-09  0:36   ` [PATCH 18/31] " Victor Lowther
                     ` (14 subsequent siblings)
  30 siblings, 0 replies; 39+ messages in thread
From: Victor Lowther @ 2009-02-09  0:35 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA

Tighten up the font installation case statement as well.

---
 dracut |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/dracut b/dracut
index a19f910..ae53caf 100755
--- a/dracut
+++ b/dracut
@@ -97,12 +97,8 @@ if [ -f /etc/sysconfig/i18n ]; then
     for FN in /lib/kbd/consolefonts/$SYSFONT.* ; do
         inst "$FN" "$initdir"
         case $FN in
-            *.gz)
-                gzip -d "$initdir$FN"
-                ;;
-            *.bz2)
-                bzip2 -d "$initdir$FN"
-                ;;
+            *.gz) gzip -d "$initdir$FN" ;;
+            *.bz2) bzip2 -d "$initdir$FN" ;;
         esac
     done
     [[ $SYSFONTACM ]] && inst /lib/kbd/consoletrans/$SYSFONTACM "$initdir"
-- 
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 18/31] Some dracut cleanups and bashification.
       [not found] ` <5a1ca330d81aeebf879bb7f0950b7ae448f7be22.1234137267.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
                     ` (15 preceding siblings ...)
  2009-02-09  0:35   ` [PATCH 17/31] " Victor Lowther
@ 2009-02-09  0:36   ` Victor Lowther
  2009-02-09  0:36   ` [PATCH 19/31] " Victor Lowther
                     ` (13 subsequent siblings)
  30 siblings, 0 replies; 39+ messages in thread
From: Victor Lowther @ 2009-02-09  0:36 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA

outfile processing can fit all on one line, so make it.

---
 dracut |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/dracut b/dracut
index ae53caf..84abdb5 100755
--- a/dracut
+++ b/dracut
@@ -24,8 +24,7 @@ while (($# > 0)); do
 done
 
 [[ $2 ]] && kernel=$2 || kernel=$(uname -r)
-[[ $1 ]] && outfile=$(readlink -f $1) || \
-    outfile="/boot/initrd-$kernel.img"
+[[ $1 ]] && outfile=$(readlink -f $1) || outfile="/boot/initrd-$kernel.img"
 
 if [[ -f $outfile && ! $force ]]; then
     echo "Will not override existing initramfs ($outfile) without --force"
-- 
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 19/31] Some dracut cleanups and bashification.
       [not found] ` <5a1ca330d81aeebf879bb7f0950b7ae448f7be22.1234137267.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
                     ` (16 preceding siblings ...)
  2009-02-09  0:36   ` [PATCH 18/31] " Victor Lowther
@ 2009-02-09  0:36   ` Victor Lowther
  2009-02-09  0:36   ` [PATCH 20/31] " Victor Lowther
                     ` (12 subsequent siblings)
  30 siblings, 0 replies; 39+ messages in thread
From: Victor Lowther @ 2009-02-09  0:36 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA

The function keyword is deprecated.  Get rid of it.

---
 dracut-functions |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dracut-functions b/dracut-functions
index 8f12021..7f9dfcd 100755
--- a/dracut-functions
+++ b/dracut-functions
@@ -24,13 +24,13 @@
 #
 #
 
-function set_verbose() {
+set_verbose() {
     foo=""
 }
 
 IF_RTLD=""
 IF_dynamic=""
-function get_dso_deps() {
+get_dso_deps() {
     local bin="$1" ; shift
 
     declare -a FILES
@@ -96,7 +96,7 @@ EOF
     echo "${FILES[@]}"
 }
 
-function inst() {
+inst() {
     if [ "$#" != "2" -a "$#" != "3" ];then
         echo "usage: inst <file> <root> [<destination file>]"
         return 1
-- 
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 20/31] Some dracut cleanups and bashification.
       [not found] ` <5a1ca330d81aeebf879bb7f0950b7ae448f7be22.1234137267.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
                     ` (17 preceding siblings ...)
  2009-02-09  0:36   ` [PATCH 19/31] " Victor Lowther
@ 2009-02-09  0:36   ` Victor Lowther
  2009-02-09  0:36   ` [PATCH 21/31] " Victor Lowther
                     ` (11 subsequent siblings)
  30 siblings, 0 replies; 39+ messages in thread
From: Victor Lowther @ 2009-02-09  0:36 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA

set_verbose is not used anywhere.  Buh-bye.

---
 dracut-functions |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/dracut-functions b/dracut-functions
index 7f9dfcd..26254a4 100755
--- a/dracut-functions
+++ b/dracut-functions
@@ -24,10 +24,6 @@
 #
 #
 
-set_verbose() {
-    foo=""
-}
-
 IF_RTLD=""
 IF_dynamic=""
 get_dso_deps() {
-- 
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 21/31] Some dracut cleanups and bashification.
       [not found] ` <5a1ca330d81aeebf879bb7f0950b7ae448f7be22.1234137267.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
                     ` (18 preceding siblings ...)
  2009-02-09  0:36   ` [PATCH 20/31] " Victor Lowther
@ 2009-02-09  0:36   ` Victor Lowther
       [not found]     ` <f81e4c7fec7010a32da9bd6e98c19eec70874af0.1234137268.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2009-02-09  0:36   ` [PATCH 22/31] " Victor Lowther
                     ` (10 subsequent siblings)
  30 siblings, 1 reply; 39+ messages in thread
From: Victor Lowther @ 2009-02-09  0:36 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA

Simplified get_dso_deps

This takes advantage of several bash specific constructs to make
get_dso_deps easier to read and understand.
---
 dracut-functions |   85 +++++++++++++++++------------------------------------
 1 files changed, 27 insertions(+), 58 deletions(-)

diff --git a/dracut-functions b/dracut-functions
index 26254a4..d7717d8 100755
--- a/dracut-functions
+++ b/dracut-functions
@@ -21,73 +21,42 @@
 #       Peter Jones <pjones-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
 #       Jeremy Katz <katzj-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
 #       Jakub Jelinek <jakub-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
-#
-#
 
 IF_RTLD=""
 IF_dynamic=""
 get_dso_deps() {
     local bin="$1" ; shift
+    local FILES=() LDSO NAME IO FILE ADDR I1 n f TLIBDIR
 
-    declare -a FILES
-    declare -a NAMES
-
-    local LDSO=$(LANG=C eu-readelf -l $bin 2>/dev/null  |grep interpreter |awk {'print $4;'} |sed -e 's/]$//')
-    [ -z "$LDSO" -o "$LDSO" == "$bin" ] && local LDSO="$IF_RTLD"
-    [ -z "$LDSO" -o "$LDSO" == "$bin" ] && return 1
-    [ -z "$IF_RTLD" ] && IF_RTLD="$LDSO"
+    LDSO=$(LANG=C eu-readelf -l $bin 2>/dev/null | \
+	awk '/interpreter/ {print $4}' |sed -e 's/]$//')
+    [[ $LDSO && $LDSO != $bin ]] || LDSO="$IF_RTLD"
+    [[ $LDSO && $LDSO != $bin ]] || return 1
+    [[ $IF_RTLD ]] || IF_RTLD="$LDSO"
 
-    # I hate shell.
-    declare -i n=0
+    # I love bash!
     while read NAME I0 FILE ADDR I1 ; do
-        [ "$FILE" == "not" ] && FILE="$FILE $ADDR"
-        [ "$NAME" == "not" ] && NAME="$NAME $I0"
-        NAMES[$n]="$NAME"
-        FILES[$n]="$FILE"
-        let n++
-    done << EOF
-        $(LD_TRACE_PRELINKING=1 LD_WARN= LD_TRACE_LOADED_OBJECTS=1 \
+	[[ $FILE = $bin ]] && continue
+        [[ $FILE = not || $NAME = not ]] && {
+	    echo "Missing a shared library required by $bin." >&2
+	    echo "dracut cannot create an initrd." >&2
+	    return 1
+	}
+	# see if we are loading an optimized version of a shared lib.
+	[[ $FILE =~ '(/lib[^/]*).*' ]] && {
+            TLIBDIR=${BASH_REMATCH[1]}
+            BASE="${FILE##*/}"
+	    # prefer nosegneg libs, then unoptimized ones.
+	    for f in "$TLIBDIR/i686/nosegneg" "$TLIBDIR"; do
+		[[ -f $f/$BASE ]] || continue
+		FILE="$f/$BASE"
+		break
+	    done
+            IF_dynamic="yes"
+	}
+        FILES+=("$FILE")
+    done < <(LD_TRACE_PRELINKING=1 LD_WARN= LD_TRACE_LOADED_OBJECTS=1 \
             $LDSO $bin 2>/dev/null)
-EOF
-
-    [ ${#FILES[*]} -eq 0 ] && return 1
-
-    # we don't want the name of the binary in the list
-    if [ "${FILES[0]}" == "$bin" ]; then
-        FILES[0]=""
-        NAMES[0]=""
-        [ ${#FILES[*]} -eq 1 ] && return 1
-    fi
-
-    declare -i n=0
-    while [ $n -lt ${#FILES[*]} ]; do
-        local FILE="${FILES[$n]}"
-        local NAME="${NAMES[$n]}"
-        if [ "$FILE" == "not found" -o "$NAME" == "not found" ]; then
-            cat 1>&2 <<EOF
-There are missing files on your system.  The dynamic object $bin
-requires ${NAMES[$n]} n order to properly function.  mkinitrd cannot continue.
-EOF
-            return 1
-        fi
-        case "$FILE" in
-            /lib*)
-                TLIBDIR=`echo "$FILE" | sed 's,\(/lib[^/]*\)/.*$,\1,'`
-                BASE=`basename "$FILE"`
-                # Prefer nosegneg libs over direct segment accesses on i686.
-                if [ -f "$TLIBDIR/i686/nosegneg/$BASE" ]; then
-                    FILE="$TLIBDIR/i686/nosegneg/$BASE"
-                # Otherwise, prefer base libraries rather than their optimized
-                # variants.
-                elif [ -f "$TLIBDIR/$BASE" ]; then
-                    FILE="$TLIBDIR/$BASE"
-                fi
-                FILES[$n]="$FILE"
-                ;;
-        esac
-        IF_dynamic="yes"
-        let n++
-    done
 
     echo "${FILES[@]}"
 }
-- 
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 22/31] Some dracut cleanups and bashification.
       [not found] ` <5a1ca330d81aeebf879bb7f0950b7ae448f7be22.1234137267.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
                     ` (19 preceding siblings ...)
  2009-02-09  0:36   ` [PATCH 21/31] " Victor Lowther
@ 2009-02-09  0:36   ` Victor Lowther
  2009-02-09  0:36   ` [PATCH 23/31] " Victor Lowther
                     ` (9 subsequent siblings)
  30 siblings, 0 replies; 39+ messages in thread
From: Victor Lowther @ 2009-02-09  0:36 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA

Bashify inst function where ot makes things easier to read.

---
 dracut-functions |   31 +++++++++++++++----------------
 1 files changed, 15 insertions(+), 16 deletions(-)

diff --git a/dracut-functions b/dracut-functions
index d7717d8..8a237ec 100755
--- a/dracut-functions
+++ b/dracut-functions
@@ -62,36 +62,35 @@ get_dso_deps() {
 }
 
 inst() {
-    if [ "$#" != "2" -a "$#" != "3" ];then
+    if (($# != 2 && $# != 3));then
         echo "usage: inst <file> <root> [<destination file>]"
         return 1
     fi
     local file="$1" ; shift
-    local root="${1%%/}/" ; shift
+    local root="${1%%/}" ; shift
     local dest="${1##/}"
-    [ -z "$dest" ] && local dest="${file##/}"
+    [[ $dest ]] || dest="${file##/}"
 
-    mkdir -p "$root/$(dirname $dest)"
+    mkdir -p "$root/${dest%/*}"
 
     local RET=0
     local target=""
     [ -L "$file" ] && target=$(readlink "$file")
-    if [ -n "$target" -a "$dest" != "$target" ]; then
-        if [ -e "$root$dest" ]; then
+    if [[ $target && $dest != $target ]]; then
+        if [[ -e $root/$dest ]]; then
             RET=0
         else
-
-            ln -sf "$target" "$root$dest"
+            ln -sf "$target" "$root/$dest"
             #inst "$target" "$root"
-            local BASE=`basename "$target"`
+            local BASE=${target##*/}
             local LIBDIR=`echo "$file" | sed -e 's,\(\(.*\)/\)[^/]\+$,\1,'`
-            if [ "$LIBDIR" = "$BASE" ]; then
+            if [[ $LIBDIR = $BASE ]]; then
                 local LIBDIR=`echo "/$dest" | sed -e 's,\(\(.*\)/\)[^/]\+$,\1,'`
             fi
 
             local TLIBDIR=`echo "$target" | sed -e 's,\(^/lib[^/]*\)/.*$,\1/,' \
                                                 -e 's,\(\(.*\)/\)[^/]\+$,\1,'`
-            if [ "$TLIBDIR" = "$BASE" ]; then
+            if [[ $TLIBDIR = $BASE ]]; then
                 local TLIBDIR=`echo "/$dest" | sed \
                                                 -e 's,\(^/lib[^/]*\)/.*$,\1/,' \
                                                 -e 's,\(\(.*\)/\)[^/]\+$,\1,'`
@@ -104,7 +103,7 @@ inst() {
     fi
 
     local SHEBANG=$(dd if="$file" bs=2 count=1 2>/dev/null)
-    if [ "$SHEBANG" == '#!' ]; then
+    if [[ $SHEBANG = '#!' ]]; then
         # We're intentionally not playing the "what did this moron run
         # in his shell script" game.  There's nothing but pain in that.
         local interp=$(head -1 "$file" | sed 's/^#! *//')
@@ -113,17 +112,17 @@ inst() {
         return $RET
     fi
 
-    if [ -e "$root$dest" ]; then
+    if [[ -e $root/$dest ]]; then
         RET=0
     else
-        if [ -n "$target" -a -L "$target" ]; then
+        if [[ $target && -L $target ]]; then
             inst "$target" "$root"
             RET=$?
         else
-            cp -aL "$file" "$root$dest"
+            cp -aL "$file" "$root/$dest"
 
             local DEPS=$(get_dso_deps "$file")
-            if [ -n "$DEPS" ]; then
+            if [[ $DEPS ]]; then
                 IF_dynamic="yes"
             fi
             for x in $DEPS ; do
-- 
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 23/31] Some dracut cleanups and bashification.
       [not found] ` <5a1ca330d81aeebf879bb7f0950b7ae448f7be22.1234137267.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
                     ` (20 preceding siblings ...)
  2009-02-09  0:36   ` [PATCH 22/31] " Victor Lowther
@ 2009-02-09  0:36   ` Victor Lowther
       [not found]     ` <f393f138baf78d7bf99d31a4912b6ae313f1842f.1234137268.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2009-02-09  0:36   ` [PATCH 24/31] " Victor Lowther
                     ` (8 subsequent siblings)
  30 siblings, 1 reply; 39+ messages in thread
From: Victor Lowther @ 2009-02-09  0:36 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA

Rip out old recursive module loading, replace with something simpler

bash allows unlimited recursion and several other tricks to make
finding all the dependencies of a kernel module much simpler.

This nukes about 130 lines, most of it in dracut-functions.

This diff also touches some cleanups made in the inst function, and
tightens up findkeymap
---
 dracut           |    6 +--
 dracut-functions |  205 +++++++++++++-----------------------------------------
 2 files changed, 50 insertions(+), 161 deletions(-)

diff --git a/dracut b/dracut
index 84abdb5..018b5aa 100755
--- a/dracut
+++ b/dracut
@@ -113,11 +113,7 @@ for d in etc proc sys sysroot dev/pts; do mkdir -p "$initdir/$d"; done
 # FIXME: hard-coded module list of doom.
 [[ $modules ]] || modules="=ata =block =drm dm-crypt aes sha256 cbc"
 
-mkdir -p "$initdir/lib/modules/$kernel"
-# expand out module deps, etc
-for mod in $(resolveAndExpandModules $modules) ; do
-    installmodule $mod "$initdir"
-done
+instmod $modules
 
 /sbin/depmod -a -b "$initdir" $kernel || {
     error "\"/sbin/depmod -a $kernel\" failed."
diff --git a/dracut-functions b/dracut-functions
index 8a237ec..732581e 100755
--- a/dracut-functions
+++ b/dracut-functions
@@ -62,7 +62,7 @@ get_dso_deps() {
 }
 
 inst() {
-    if (($# != 2 && $# != 3));then
+    if (($# != 2 && $# != 3)); then
         echo "usage: inst <file> <root> [<destination file>]"
         return 1
     fi
@@ -70,12 +70,10 @@ inst() {
     local root="${1%%/}" ; shift
     local dest="${1##/}"
     [[ $dest ]] || dest="${file##/}"
-
     mkdir -p "$root/${dest%/*}"
-
     local RET=0
     local target=""
-    [ -L "$file" ] && target=$(readlink "$file")
+    [[ -L $file ]] && target=$(readlink "$file")
     if [[ $target && $dest != $target ]]; then
         if [[ -e $root/$dest ]]; then
             RET=0
@@ -83,25 +81,22 @@ inst() {
             ln -sf "$target" "$root/$dest"
             #inst "$target" "$root"
             local BASE=${target##*/}
-            local LIBDIR=`echo "$file" | sed -e 's,\(\(.*\)/\)[^/]\+$,\1,'`
+            local LIBDIR=$(echo "$file" | sed -e 's,\(\(.*\)/\)[^/]\+$,\1,')
             if [[ $LIBDIR = $BASE ]]; then
-                local LIBDIR=`echo "/$dest" | sed -e 's,\(\(.*\)/\)[^/]\+$,\1,'`
-            fi
-
-            local TLIBDIR=`echo "$target" | sed -e 's,\(^/lib[^/]*\)/.*$,\1/,' \
-                                                -e 's,\(\(.*\)/\)[^/]\+$,\1,'`
+                local LIBDIR=$(echo "/$dest" | sed -e 's,\(\(.*\)/\)[^/]\+$,\1,')
+            fi  
+            local TLIBDIR=$(echo "$target" | sed -e 's,\(^/lib[^/]*\)/.*$,\1/,' \
+                -e 's,\(\(.*\)/\)[^/]\+$,\1,')
             if [[ $TLIBDIR = $BASE ]]; then
-                local TLIBDIR=`echo "/$dest" | sed \
-                                                -e 's,\(^/lib[^/]*\)/.*$,\1/,' \
-                                                -e 's,\(\(.*\)/\)[^/]\+$,\1,'`
+                local TLIBDIR=$(echo "/$dest" | sed \
+                    -e 's,\(^/lib[^/]*\)/.*$,\1/,' \
+                    -e 's,\(\(.*\)/\)[^/]\+$,\1,')
             fi
-
             inst "$LIBDIR/$BASE" "$root" "$TLIBDIR/$BASE"
             RET=$?
             return $RET
         fi
     fi
-
     local SHEBANG=$(dd if="$file" bs=2 count=1 2>/dev/null)
     if [[ $SHEBANG = '#!' ]]; then
         # We're intentionally not playing the "what did this moron run
@@ -111,7 +106,6 @@ inst() {
         RET=$?
         return $RET
     fi
-
     if [[ -e $root/$dest ]]; then
         RET=0
     else
@@ -120,162 +114,61 @@ inst() {
             RET=$?
         else
             cp -aL "$file" "$root/$dest"
-
             local DEPS=$(get_dso_deps "$file")
             if [[ $DEPS ]]; then
-                IF_dynamic="yes"
+		for x in $DEPS; do
+                    local TLIBDIR=$(echo "$x" | sed 's,\(/lib[^/]*\)/.*$,\1,')
+                    local BASE=$(basename "$x")
+                    inst "$x" "$root" "$TLIBDIR/$BASE"
+		done
+		RET=$?
             fi
-            for x in $DEPS ; do
-                local TLIBDIR=`echo "$x" | sed 's,\(/lib[^/]*\)/.*$,\1,'`
-                local BASE=`basename "$x"`
-                inst "$x" "$root" "$TLIBDIR/$BASE"
-            done
-            RET=$?
-        fi
+	fi
     fi
     return $RET
 }
 
-# module dep finding and installation functions
-moduledep() {
-    MPARGS=""
-    if [ "$1" == "--ignore-install" ]; then
-        MPARGS="$MPARGS --ignore-install"
-        shift
-    fi
-    deps=""
-    deps=$(modprobe $MPARGS --set-version $kernel --show-depends $1 2>/dev/null| awk '/^insmod / { print gensub(".*/","","g",$2) }' | while read foo ; do [ "${foo%%.ko}" != "$1" ] && echo -n "${foo%%.ko} " ; done)
-}
-
-locatemodule() {
-    MPARGS=""
-    if [ "$1" == "--ignore-install" ]; then
-        MPARGS="$MPARGS --ignore-install"
-        shift
-    fi
-    fmPath=$(modprobe $MPARGS --set-version $kernel --show-depends $1 2>/dev/null | awk '/^insmod / { print $2; }' | tail -1)
-    if [ -n "$fmPath" -a -f "$fmPath" ]; then
-        return 0
-    fi
-    for modExt in o.gz o ko ; do
-        for modDir in /lib/modules/$kernel/updates /lib/modules/$kernel ; do
-            if [ -d $modDir ]; then
-                fmPath=$(find $modDir -name $1.ko |awk {'print $1; exit;'})
-                if [ -n "$fmPath" -a -f "$fmPath" ]; then
-                    return 0
-                fi
-            fi
-        done
+modcat="/lib/modules/$kernel/modules"
+instmods() {
+    local mod mpargs modpath modname cmd
+    while (($# > 0)); do
+	mod=${1%.ko}
+	case $mod in
+	    =ata) instmods $mpargs $(cat "${modcat}.block" |egrep 'ata|ahci');;
+	    =*) instmods $mpargs $(cat "${modcat}.${mod#=}");;
+	    --*) mpargs+=" $mod";;
+	    *) modprobe $mpargs --set-version $kernel --show-depends $mod \
+		2>/dev/null |while read cmd modpath; do
+		    [[ $cmd = insmod ]] || continue
+		    modname=${modpath##*/}
+		    modname=${modname%.ko}
+		    [[ ${mod/-/_} != ${modname/-/_} ]] && {
+			instmods $mpargs $modname
+			continue
+		    }
+		    inst "$modpath" "$initdir" "/lib/modules/$kernel/$modname.ko"
+		done
+		;;
+	esac
+	shift
     done
-    return 1
-}
-
-resolveAndExpandModules() {
-    items=$*
-
-    mods=$(expandModules $items)
-    resdeps mods
-    echo $resolved
-}
-
-expandModules() {
-    items=$*
-
-    for m in $items ; do
-	char=$(echo $m | cut -c1)
-	if [ $char = '=' ]; then
-	    NAME=$(echo $m | cut -c2-)
-	    if [ "$NAME" = "ata" ]; then
-		MODS="$MODS $(cat /lib/modules/$kernel/modules.block |egrep '(ata|ahci)' |sed -e 's/.ko//')"
-	    else
-                # Ignore if group list does not exist
-                if [ -e /lib/modules/$kernel/modules.$NAME ]; then
-		    MODS="$MODS $(cat /lib/modules/$kernel/modules.$NAME |sed -e 's/.ko//')"
-                fi
-	    fi
-	else
-	    MODS="$MODS $m"
-	fi
-    done
-    echo $MODS
-}
-
-installmodule()
-{
-    MPARGS=""
-    if [ "$1" == "--ignore-install" ]; then
-        MPARGS="$MPARGS --ignore-install"
-        shift
-    fi
-    MODULE=$1
-    MNTIMAGE=$2
-    fmPath=""
-    locatemodule $MPARGS $MODULE
-    MODULE=$fmPath
-    if [ -z "$MODULE" ]; then
-        return
-    fi
-    if [ -x /usr/bin/strip ]; then
-        /usr/bin/strip -g  $MODULE -o $MNTIMAGE/lib/modules/$kernel/$(basename $MODULE)
-    else
-        inst "$MODULE" "$MNTIMAGE" "/lib/modules/$kernel/$(basename $MODULE)"
-    fi
-    for fw in $(/sbin/modinfo -F firmware $MODULE 2>/dev/null); do
+    for fw in $(/sbin/modinfo -F firmware $mod 2>/dev/null); do
         if [ -f /lib/firmware/$fw ]; then
-            inst "/lib/firmware/$fw" "$MNTIMAGE" "/lib/firmware/$fw"
+            inst_simple "/lib/firmware/$fw"
         fi
     done
-}
-
-# This loops to make sure it resolves dependencies of dependencies of...
-resdeps () {
-    modlist="$1"
-
-    before=1
-    after=2
-
-    items=$(eval echo \${$modlist})
-    while [ $before != $after ]; do
-        before=$(echo $items | wc -c)
-        list=""
-
-        for i in $items ; do
-            deps=""
-            moduledep $i
-            list="$list $deps"
-        done
-        items=$(for n in $items $list; do echo $n; done | sort -u)
-        after=`echo $items | wc -c`
-    done
-
-    resolved="$items"
-}
+} 
 
 findkeymap () {
     local MAP=$1
-
-    if [ ! -f "$MAP" ]; then
-        MAP=$(find /lib/kbd/keymaps -type f -name $MAP -o -name $MAP.\* | head -n1)
-    fi
-
-    case " $KEYMAPS " in
-        *" $MAP "*)
-            return
-            ;;
-    esac
-
+    [[ ! -f $MAP ]] && \
+	MAP=$(find /lib/kbd/keymaps -type f -name $MAP -o -name $MAP.\* | head -n1)
+    [[ " $KEYMAPS " = *" $MAP "* ]] && return
     KEYMAPS="$KEYMAPS $MAP"
-
     case $MAP in
-        *.gz)
-            cmd=zgrep
-            ;;
-        *.bz2)
-            cmd=bzgrep
-            ;;
-        *)
-            cmd=grep
-            ;;
+        *.gz) cmd=zgrep;;
+        *.bz2) cmd=bzgrep;;
+        *) cmd=grep ;;
     esac
 
     for INCL in $($cmd "^include " $MAP | cut -d' ' -f2 | tr -d '"'); do
-- 
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 24/31] Some dracut cleanups and bashification.
       [not found] ` <5a1ca330d81aeebf879bb7f0950b7ae448f7be22.1234137267.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
                     ` (21 preceding siblings ...)
  2009-02-09  0:36   ` [PATCH 23/31] " Victor Lowther
@ 2009-02-09  0:36   ` Victor Lowther
  2009-02-09  0:36   ` [PATCH 25/31] " Victor Lowther
                     ` (7 subsequent siblings)
  30 siblings, 0 replies; 39+ messages in thread
From: Victor Lowther @ 2009-02-09  0:36 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA

Replace inst function with a family of specialized functions

This makes things shorter and easier to read.
---
 dracut           |   20 ++++----
 dracut-functions |  140 +++++++++++++++++++++++++++---------------------------
 init             |    2 +-
 3 files changed, 81 insertions(+), 81 deletions(-)

diff --git a/dracut b/dracut
index 018b5aa..8bebbd6 100755
--- a/dracut
+++ b/dracut
@@ -50,7 +50,7 @@ udevexe="/lib/udev/vol_id /lib/udev/console_init"
 
 # install base files
 for binary in $exe $debugexe $udevexe $lvmexe $cryptexe ; do
-  inst $binary "$initdir"
+  inst $binary
 done
 
 # FIXME: would be nice if we didn't have to know which rules to grab....
@@ -73,12 +73,12 @@ if [[ -f /etc/sysconfig/keyboard || -f /etc/sysconfig/console/default.kmap ]]; t
         [[ $KEYTABLE && -d /lib/kbd/keymaps ]] && KEYMAP="$KEYTABLE.map"
     fi
     if [[ $KEYMAP ]]; then
-        [ -f /etc/sysconfig/keyboard ] && inst /etc/sysconfig/keyboard "$initdir"
-        inst /bin/loadkeys "$initdir"
+        [ -f /etc/sysconfig/keyboard ] && inst /etc/sysconfig/keyboard
+        inst /bin/loadkeys
         findkeymap $KEYMAP
 
         for FN in $KEYMAPS; do
-            inst $FN "$initdir"
+            inst $FN
             case $FN in
                 *.gz) gzip -d "$initdir$FN" ;;
                 *.bz2) bzip2 -d "$initdir$FN" ;;
@@ -89,19 +89,19 @@ fi
 
 if [ -f /etc/sysconfig/i18n ]; then
     . /etc/sysconfig/i18n
-    inst /etc/sysconfig/i18n "$initdir"
+    inst /etc/sysconfig/i18n
     [[ $SYSFONT ]] || SYSFONT=latarcyrheb-sun16
-    inst /bin/setfont "$initdir"
+    inst /bin/setfont
 
     for FN in /lib/kbd/consolefonts/$SYSFONT.* ; do
-        inst "$FN" "$initdir"
+        inst "$FN"
         case $FN in
             *.gz) gzip -d "$initdir$FN" ;;
             *.bz2) bzip2 -d "$initdir$FN" ;;
         esac
     done
-    [[ $SYSFONTACM ]] && inst /lib/kbd/consoletrans/$SYSFONTACM "$initdir"
-    [[ $UNIMAP ]] && inst /lib/kbd/unimaps/$UNIMAP "$initdir"
+    [[ $SYSFONTACM ]] && inst /lib/kbd/consoletrans/$SYSFONTACM
+    [[ $UNIMAP ]] && inst /lib/kbd/unimaps/$UNIMAP
 fi
 
 # install our files
@@ -113,7 +113,7 @@ for d in etc proc sys sysroot dev/pts; do mkdir -p "$initdir/$d"; done
 # FIXME: hard-coded module list of doom.
 [[ $modules ]] || modules="=ata =block =drm dm-crypt aes sha256 cbc"
 
-instmod $modules
+instmods $modules
 
 /sbin/depmod -a -b "$initdir" $kernel || {
     error "\"/sbin/depmod -a $kernel\" failed."
diff --git a/dracut-functions b/dracut-functions
index 732581e..1ded3d8 100755
--- a/dracut-functions
+++ b/dracut-functions
@@ -24,9 +24,41 @@
 
 IF_RTLD=""
 IF_dynamic=""
-get_dso_deps() {
-    local bin="$1" ; shift
-    local FILES=() LDSO NAME IO FILE ADDR I1 n f TLIBDIR
+
+# $1 = file to copy to ramdisk
+# $2 (optional) Name for the file on the ramdisk
+# Location of the image dir is assumed to be $initdir
+inst_simple() {
+    local src=$1 target="${initdir}${2:-$1}"
+    [[ -f $target ]] && return 0
+    echo "Installing $src to $target"
+    mkdir -p "${target%/*}"
+    cp -fL "$src" "$target"
+}
+
+inst_library() {
+    local src=$1 dest=${2:-$1}
+    [[ -f $initdir$dest ]] && return 0
+    if [[ -L $src ]]; then
+	reallib="$(readlink "$src")"
+	lib=${src##*/}
+	realsrc="${src%/*}/$reallib"
+	realdest="${dest%/*}/$reallib"
+	inst_simple "$realsrc" "$realdest"
+	(cd "${initdir}${dest%/*}" && ln -s "$reallib" "$lib")
+    else
+	inst_simple "$src" "$dest"
+    fi
+}
+	
+	
+
+# Same as above.
+# If the file is a binary executable, install all its
+# shared library dependencies, if any.
+inst_binary() {
+    local bin="$1" target="${2:-$1}"
+    local LDSO NAME IO FILE ADDR I1 n f TLIBDIR
 
     LDSO=$(LANG=C eu-readelf -l $bin 2>/dev/null | \
 	awk '/interpreter/ {print $4}' |sed -e 's/]$//')
@@ -36,14 +68,14 @@ get_dso_deps() {
 
     # I love bash!
     while read NAME I0 FILE ADDR I1 ; do
-	[[ $FILE = $bin ]] && continue
+	[[ $FILE = $bin ]] && continue 
         [[ $FILE = not || $NAME = not ]] && {
 	    echo "Missing a shared library required by $bin." >&2
 	    echo "dracut cannot create an initrd." >&2
-	    return 1
+	    exit 1
 	}
 	# see if we are loading an optimized version of a shared lib.
-	[[ $FILE =~ '(/lib[^/]*).*' ]] && {
+	[[ $FILE =~ '^(/lib[^/]*).*' ]] && {
             TLIBDIR=${BASH_REMATCH[1]}
             BASE="${FILE##*/}"
 	    # prefer nosegneg libs, then unoptimized ones.
@@ -52,80 +84,48 @@ get_dso_deps() {
 		FILE="$f/$BASE"
 		break
 	    done
+	    inst_library "$FILE" "$TLIBDIR/$BASE"
             IF_dynamic="yes"
+	    continue
 	}
-        FILES+=("$FILE")
+        inst_library "$FILE" 
     done < <(LD_TRACE_PRELINKING=1 LD_WARN= LD_TRACE_LOADED_OBJECTS=1 \
             $LDSO $bin 2>/dev/null)
+    inst_simple "$bin" "$target"
+}
 
-    echo "${FILES[@]}"
+# same as above, except for shell scripts.
+# If your shell script does not start with shebang, it is not a shell script.
+inst_script() {
+    local src=$1 target=${2:-$1} line
+    read -r -n 80 line <"$src"
+    [[ $line =~ '(#! *)(/[^ ]+).*' ]] || return 1
+    inst "${BASH_REMATCH[2]}" && inst_simple "$src" "$target"
 }
 
+# same as above, but specialized for symlinks
+inst_symlink() {
+    local src=$1 target=$initdir${2:-$1} realsrc
+    [[ -L $1 ]] || return 1
+    [[ -L $target ]] && return 0
+    realsrc=$(readlink "$src")
+    [[ $realsrc = ${realsrc##*/} ]] && realsrc="${src%/*}/$realsrc"
+    inst "$realsrc" && ln -s "$realsrc" "$target"
+}
+
+# general purpose installation function
+# Same args as above.
+# Just tries to install as a binary, a shell script, then a simple data file.
 inst() {
-    if (($# != 2 && $# != 3)); then
+    if (($# != 1 && $# != 2)); then
         echo "usage: inst <file> <root> [<destination file>]"
         return 1
     fi
-    local file="$1" ; shift
-    local root="${1%%/}" ; shift
-    local dest="${1##/}"
-    [[ $dest ]] || dest="${file##/}"
-    mkdir -p "$root/${dest%/*}"
-    local RET=0
-    local target=""
-    [[ -L $file ]] && target=$(readlink "$file")
-    if [[ $target && $dest != $target ]]; then
-        if [[ -e $root/$dest ]]; then
-            RET=0
-        else
-            ln -sf "$target" "$root/$dest"
-            #inst "$target" "$root"
-            local BASE=${target##*/}
-            local LIBDIR=$(echo "$file" | sed -e 's,\(\(.*\)/\)[^/]\+$,\1,')
-            if [[ $LIBDIR = $BASE ]]; then
-                local LIBDIR=$(echo "/$dest" | sed -e 's,\(\(.*\)/\)[^/]\+$,\1,')
-            fi  
-            local TLIBDIR=$(echo "$target" | sed -e 's,\(^/lib[^/]*\)/.*$,\1/,' \
-                -e 's,\(\(.*\)/\)[^/]\+$,\1,')
-            if [[ $TLIBDIR = $BASE ]]; then
-                local TLIBDIR=$(echo "/$dest" | sed \
-                    -e 's,\(^/lib[^/]*\)/.*$,\1/,' \
-                    -e 's,\(\(.*\)/\)[^/]\+$,\1,')
-            fi
-            inst "$LIBDIR/$BASE" "$root" "$TLIBDIR/$BASE"
-            RET=$?
-            return $RET
-        fi
-    fi
-    local SHEBANG=$(dd if="$file" bs=2 count=1 2>/dev/null)
-    if [[ $SHEBANG = '#!' ]]; then
-        # We're intentionally not playing the "what did this moron run
-        # in his shell script" game.  There's nothing but pain in that.
-        local interp=$(head -1 "$file" | sed 's/^#! *//')
-        inst "$interp" "$root"
-        RET=$?
-        return $RET
-    fi
-    if [[ -e $root/$dest ]]; then
-        RET=0
-    else
-        if [[ $target && -L $target ]]; then
-            inst "$target" "$root"
-            RET=$?
-        else
-            cp -aL "$file" "$root/$dest"
-            local DEPS=$(get_dso_deps "$file")
-            if [[ $DEPS ]]; then
-		for x in $DEPS; do
-                    local TLIBDIR=$(echo "$x" | sed 's,\(/lib[^/]*\)/.*$,\1,')
-                    local BASE=$(basename "$x")
-                    inst "$x" "$root" "$TLIBDIR/$BASE"
-		done
-		RET=$?
-            fi
-	fi
-    fi
-    return $RET
+    local src=$1 dest=${2:-$1}
+    for x in inst_symlink inst_binary inst_script inst_simple; do
+	$x "$src" "$dest" && return 0
+    done
+    return 1
 }
 
 modcat="/lib/modules/$kernel/modules"
@@ -146,7 +146,7 @@ instmods() {
 			instmods $mpargs $modname
 			continue
 		    }
-		    inst "$modpath" "$initdir" "/lib/modules/$kernel/$modname.ko"
+		    inst_simple "$modpath" "/lib/modules/$kernel/$modname.ko"
 		done
 		;;
 	esac
diff --git a/init b/init
index 599f8ad..d5095ea 100755
--- a/init
+++ b/init
@@ -44,7 +44,7 @@ mknod /dev/tty1 c 4 1
 
 # start plymouth if it's available
 # arguably we need some of udev run first for fbmods and above devnodes :/
-[ -x /bin/plymouthd ] && plymouthd --attach-to-session
+[ -x /bin/plymouthd ] && plymouthd
 [ -x /bin/plymouth ] && plymouth --show-splash
 
 
-- 
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 25/31] Some dracut cleanups and bashification.
       [not found] ` <5a1ca330d81aeebf879bb7f0950b7ae448f7be22.1234137267.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
                     ` (22 preceding siblings ...)
  2009-02-09  0:36   ` [PATCH 24/31] " Victor Lowther
@ 2009-02-09  0:36   ` Victor Lowther
  2009-02-09  0:36   ` [PATCH 26/31] " Victor Lowther
                     ` (6 subsequent siblings)
  30 siblings, 0 replies; 39+ messages in thread
From: Victor Lowther @ 2009-02-09  0:36 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA

Add dmesg to the list of debugging tools

---
 dracut |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dracut b/dracut
index 8bebbd6..c444c92 100755
--- a/dracut
+++ b/dracut
@@ -44,7 +44,7 @@ exe="/bin/bash /bin/mount /bin/mknod /bin/mkdir /sbin/modprobe /sbin/udevd /sbin
 lvmexe="/sbin/lvm"
 cryptexe="/sbin/cryptsetup"
 # and some things that are nice for debugging
-debugexe="/bin/ls /bin/cat /bin/ln /bin/ps /bin/grep /bin/more"
+debugexe="/bin/ls /bin/cat /bin/ln /bin/ps /bin/grep /bin/more /bin/dmesg"
 # udev things we care about
 udevexe="/lib/udev/vol_id /lib/udev/console_init"
 
-- 
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 26/31] Some dracut cleanups and bashification.
       [not found] ` <5a1ca330d81aeebf879bb7f0950b7ae448f7be22.1234137267.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
                     ` (23 preceding siblings ...)
  2009-02-09  0:36   ` [PATCH 25/31] " Victor Lowther
@ 2009-02-09  0:36   ` Victor Lowther
  2009-02-09  0:36   ` [PATCH 27/31] " Victor Lowther
                     ` (5 subsequent siblings)
  30 siblings, 0 replies; 39+ messages in thread
From: Victor Lowther @ 2009-02-09  0:36 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA

Make init less noisy and load fs modules for all mounted filesystems

---
 dracut |    5 +++++
 init   |    9 +++++----
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/dracut b/dracut
index c444c92..eb6632d 100755
--- a/dracut
+++ b/dracut
@@ -115,6 +115,11 @@ for d in etc proc sys sysroot dev/pts; do mkdir -p "$initdir/$d"; done
 
 instmods $modules
 
+# Grab modules for all filesystem types we currently know about
+while read d mp t rest; do
+    instmods "$t"
+done </proc/mounts
+
 /sbin/depmod -a -b "$initdir" $kernel || {
     error "\"/sbin/depmod -a $kernel\" failed."
     exit 1
diff --git a/init b/init
index d5095ea..10a789b 100755
--- a/init
+++ b/init
@@ -41,6 +41,7 @@ mkdir /dev/pts
 mount -t devpts -o gid=5,mode=620 /dev/pts /dev/pts
 mknod /dev/tty0 c 4 0
 mknod /dev/tty1 c 4 1
+mknod /dev/null c 1 3
 
 # start plymouth if it's available
 # arguably we need some of udev run first for fbmods and above devnodes :/
@@ -50,7 +51,7 @@ mknod /dev/tty1 c 4 1
 
 # start up udev and trigger cold plugs
 udevd --daemon
-udevadm trigger
+udevadm trigger >/dev/null 2>&1
 
 # mount the rootfs
 NEWROOT="/sysroot"
@@ -59,7 +60,7 @@ NEWROOT="/sysroot"
 # it'd be nice if we had a udev rule that just did all of the bits for
 # figuring out what the specified root is and linking it /dev/root
 root=$(getarg 'root=*'); root=${root#root=}
-echo -n "Going to mount rootfs ($root)"
+plymouth --update "Going to mount rootfs ($root)"
 case $root in
     LABEL=*) root=${root#LABEL=}
              root=${root//\//\\x2f}
@@ -71,12 +72,12 @@ esac
 
 # should we have a timeout?
 tries=0
+plymouth --update "Waiting up to 30 seconds for $root to become available"
 until [[ -e $root ]]; do
-  echo -n "."
   sleep 1
   ((tries++ > 30)) && emergency_shell
 done
-echo -e "\n\nMounting rootfs after $tries seconds"
+plymouth --update "Mounting rootfs after $tries seconds"
 ln -s "$root" /dev/root    
 mount -o ro /dev/root $NEWROOT || emergency_shell
 
-- 
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 27/31] Some dracut cleanups and bashification.
       [not found] ` <5a1ca330d81aeebf879bb7f0950b7ae448f7be22.1234137267.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
                     ` (24 preceding siblings ...)
  2009-02-09  0:36   ` [PATCH 26/31] " Victor Lowther
@ 2009-02-09  0:36   ` Victor Lowther
  2009-02-09  0:36   ` [PATCH 28/31] " Victor Lowther
                     ` (4 subsequent siblings)
  30 siblings, 0 replies; 39+ messages in thread
From: Victor Lowther @ 2009-02-09  0:36 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA

Don't leave cruft behind in /tmp

---
 dracut |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/dracut b/dracut
index eb6632d..56695c1 100755
--- a/dracut
+++ b/dracut
@@ -38,6 +38,7 @@ switchroot=$dsrc/switch_root
 rulesdir=$dsrc/rules.d
 
 initdir=$(mktemp -d -t initramfs.XXXXXX)
+trap 'rm -rf "$initdir"' 0 # clean up after ourselves no matter how we die.
 
 # executables that we have to have
 exe="/bin/bash /bin/mount /bin/mknod /bin/mkdir /sbin/modprobe /sbin/udevd /sbin/udevadm /sbin/nash /sbin/pidof /bin/sleep /usr/sbin/chroot"
-- 
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 28/31] Some dracut cleanups and bashification.
       [not found] ` <5a1ca330d81aeebf879bb7f0950b7ae448f7be22.1234137267.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
                     ` (25 preceding siblings ...)
  2009-02-09  0:36   ` [PATCH 27/31] " Victor Lowther
@ 2009-02-09  0:36   ` Victor Lowther
  2009-02-09  0:36   ` [PATCH 29/31] " Victor Lowther
                     ` (3 subsequent siblings)
  30 siblings, 0 replies; 39+ messages in thread
From: Victor Lowther @ 2009-02-09  0:36 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA

Remove dependency on plymouth for getroot, pass 1.

---
 dracut                |    2 +-
 init                  |   13 +++++++++++--
 rules.d/63-luks.rules |    3 +--
 3 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/dracut b/dracut
index 56695c1..630b78b 100755
--- a/dracut
+++ b/dracut
@@ -41,7 +41,7 @@ initdir=$(mktemp -d -t initramfs.XXXXXX)
 trap 'rm -rf "$initdir"' 0 # clean up after ourselves no matter how we die.
 
 # executables that we have to have
-exe="/bin/bash /bin/mount /bin/mknod /bin/mkdir /sbin/modprobe /sbin/udevd /sbin/udevadm /sbin/nash /sbin/pidof /bin/sleep /usr/sbin/chroot"
+exe="/bin/bash /bin/mount /bin/mknod /bin/mkdir /sbin/modprobe /sbin/udevd /sbin/udevadm /sbin/nash /sbin/pidof /bin/sleep /usr/sbin/chroot /bin/echo"
 lvmexe="/sbin/lvm"
 cryptexe="/sbin/cryptsetup"
 # and some things that are nice for debugging
diff --git a/init b/init
index 10a789b..ea06687 100755
--- a/init
+++ b/init
@@ -74,8 +74,17 @@ esac
 tries=0
 plymouth --update "Waiting up to 30 seconds for $root to become available"
 until [[ -e $root ]]; do
-  sleep 1
-  ((tries++ > 30)) && emergency_shell
+    [[ -f /cryptroot ]] && {
+	tries=27
+	cryptopts=$(< /cryptroot)
+	if [ -x /bin/plymouth ] && plymouth --ping; then
+	    /bin/plymouth ask-for-password \
+		--command "/sbin/cryptsetup luksOpen $cryptopts" && break
+	else
+	    /sbin/cryptsetup luksOpen $cryptopts && break
+	fi
+    sleep 1
+    ((tries++ > 30)) && emergency_shell
 done
 plymouth --update "Mounting rootfs after $tries seconds"
 ln -s "$root" /dev/root    
diff --git a/rules.d/63-luks.rules b/rules.d/63-luks.rules
index 5d8297b..ab907e9 100644
--- a/rules.d/63-luks.rules
+++ b/rules.d/63-luks.rules
@@ -8,7 +8,6 @@ SUBSYSTEM!="block", GOTO="luks_end"
 ACTION!="add|change", GOTO="luks_end"
 
 KERNEL!="sr*", IMPORT{program}="vol_id --export $tempnode"
-ENV{ID_FS_TYPE}=="crypto_LUKS", RUN+="/bin/plymouth ask-for-password --command '/sbin/cryptsetup luksOpen $env{DEVNAME} luks-$env{ID_FS_UUID}"
-
+ENV{ID_FS_TYPE}=="crypto_LUKS", RUN+="/echoer /cryptroot $env{DEVNAME} luks-$env{ID_FS_UUID}"
 
 LABEL="luks_end"
-- 
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 29/31] Some dracut cleanups and bashification.
       [not found] ` <5a1ca330d81aeebf879bb7f0950b7ae448f7be22.1234137267.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
                     ` (26 preceding siblings ...)
  2009-02-09  0:36   ` [PATCH 28/31] " Victor Lowther
@ 2009-02-09  0:36   ` Victor Lowther
  2009-02-09  0:36   ` [PATCH 30/31] " Victor Lowther
                     ` (2 subsequent siblings)
  30 siblings, 0 replies; 39+ messages in thread
From: Victor Lowther @ 2009-02-09  0:36 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA

Add echoer script

This should be squashed into the previous patch, but I am feeling lazy.

---
 Makefile |    1 +
 dracut   |    2 ++
 echoer   |    4 ++++
 3 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile
index b3704e7..a4d1348 100644
--- a/Makefile
+++ b/Makefile
@@ -8,6 +8,7 @@ install:
 	install -m 0755 init $(DESTDIR)/usr/libexec/dracut/init
 	install -m 0755 switch_root $(DESTDIR)/usr/libexec/dracut/switch_root
 	install -m 0755 dracut-functions $(DESTDIR)/usr/libexec/dracut/functions
+	install -m 0755 echoer $(DESTDIR)/usr/libexec/dracut/echoer
 	mkdir $(DESTDIR)/usr/libexec/dracut/rules.d
 	for rule in rules.d/*.rules ; do install -m 0644 $$rule $(DESTDIR)/usr/libexec/dracut/rules.d ; done
 
diff --git a/dracut b/dracut
index 630b78b..cade0e9 100755
--- a/dracut
+++ b/dracut
@@ -36,6 +36,7 @@ fi
 initfile=$dsrc/init
 switchroot=$dsrc/switch_root
 rulesdir=$dsrc/rules.d
+echoer=$dsrc/echoer
 
 initdir=$(mktemp -d -t initramfs.XXXXXX)
 trap 'rm -rf "$initdir"' 0 # clean up after ourselves no matter how we die.
@@ -108,6 +109,7 @@ fi
 # install our files
 cp $initfile "$initdir/init"
 cp $switchroot "$initdir/sbin/switch_root"
+cp $echoer "$initdir/echoer"
 
 # and create some directory structure
 for d in etc proc sys sysroot dev/pts; do mkdir -p "$initdir/$d"; done
diff --git a/echoer b/echoer
new file mode 100755
index 0000000..249155d
--- /dev/null
+++ b/echoer
@@ -0,0 +1,4 @@
+#!/bin/bash
+target=$1
+shift
+echo "$@" >"$target"
\ No newline at end of file
-- 
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 30/31] Some dracut cleanups and bashification.
       [not found] ` <5a1ca330d81aeebf879bb7f0950b7ae448f7be22.1234137267.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
                     ` (27 preceding siblings ...)
  2009-02-09  0:36   ` [PATCH 29/31] " Victor Lowther
@ 2009-02-09  0:36   ` Victor Lowther
  2009-02-09  0:37   ` [PATCH 31/31] " Victor Lowther
  2009-02-09 17:15   ` [PATCH 01/31] " Dave Jones
  30 siblings, 0 replies; 39+ messages in thread
From: Victor Lowther @ 2009-02-09  0:36 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA

We no longer need plymouth. Since dracut is supposed to be distro agnostic,
probably best to not include it in the base backage, and work out an easy way
for distros to add it as needed.

init will ask for a passphrase directly if an encrypted root is detected.

Also, use udevadm settle with a 30 second timeout instead of a hardcoded
30 count loop.
---
 dracut |    5 -----
 init   |   36 +++++++++++-------------------------
 2 files changed, 11 insertions(+), 30 deletions(-)

diff --git a/dracut b/dracut
index cade0e9..382290e 100755
--- a/dracut
+++ b/dracut
@@ -128,9 +128,4 @@ done </proc/mounts
     exit 1
 }
 
-# plymouth
-if [ -x /usr/libexec/plymouth/plymouth-populate-initrd ]; then
-    /usr/libexec/plymouth/plymouth-populate-initrd -t "$initdir" || :
-fi
-
 ( cd "$initdir"; find . |cpio -H newc -o |gzip -9 > "$outfile"; )
diff --git a/init b/init
index ea06687..b12743c 100755
--- a/init
+++ b/init
@@ -7,7 +7,6 @@
 
 emergency_shell()
 {
-    [ -x /bin/plymouth ] && plymouth --hide-splash
     echo ; echo
     echo "Bug in initramfs /init detected. Dropping to a shell. Good luck!"
     echo
@@ -36,6 +35,7 @@ mount -t tmpfs -omode=0755 udev /dev
 
 # FIXME: what device nodes does plymouth really _need_ ?
 mknod /dev/ptmx c 5 2
+mknod /dev/console c 5 0
 mknod /dev/fb c 29 0
 mkdir /dev/pts
 mount -t devpts -o gid=5,mode=620 /dev/pts /dev/pts
@@ -43,12 +43,6 @@ mknod /dev/tty0 c 4 0
 mknod /dev/tty1 c 4 1
 mknod /dev/null c 1 3
 
-# start plymouth if it's available
-# arguably we need some of udev run first for fbmods and above devnodes :/
-[ -x /bin/plymouthd ] && plymouthd
-[ -x /bin/plymouth ] && plymouth --show-splash
-
-
 # start up udev and trigger cold plugs
 udevd --daemon
 udevadm trigger >/dev/null 2>&1
@@ -60,7 +54,6 @@ NEWROOT="/sysroot"
 # it'd be nice if we had a udev rule that just did all of the bits for
 # figuring out what the specified root is and linking it /dev/root
 root=$(getarg 'root=*'); root=${root#root=}
-plymouth --update "Going to mount rootfs ($root)"
 case $root in
     LABEL=*) root=${root#LABEL=}
              root=${root//\//\\x2f}
@@ -72,21 +65,16 @@ esac
 
 # should we have a timeout?
 tries=0
-plymouth --update "Waiting up to 30 seconds for $root to become available"
-until [[ -e $root ]]; do
-    [[ -f /cryptroot ]] && {
-	tries=27
-	cryptopts=$(< /cryptroot)
-	if [ -x /bin/plymouth ] && plymouth --ping; then
-	    /bin/plymouth ask-for-password \
-		--command "/sbin/cryptsetup luksOpen $cryptopts" && break
-	else
-	    /sbin/cryptsetup luksOpen $cryptopts && break
-	fi
-    sleep 1
-    ((tries++ > 30)) && emergency_shell
-done
-plymouth --update "Mounting rootfs after $tries seconds"
+echo "Waiting up to 30 seconds for $root to become available"
+udevadm settle --timeout=30
+[[ -f /cryptroot ]] && {
+    echo "Encrypted root detected."
+    cryptopts=$(< /cryptroot)
+    /sbin/cryptsetup luksOpen $cryptopts || emergency_shell
+    udevadm settle --timeout=30
+}
+echo "Trying to mount rootfs $root"
+[[ -e $root ]] || emergency_shell
 ln -s "$root" /dev/root    
 mount -o ro /dev/root $NEWROOT || emergency_shell
 
@@ -113,8 +101,6 @@ fi
 # kill off udev
 kill $(pidof udevd)
 
-[ -x /bin/plymouth ] && plymouth --newroot=$NEWROOT
-
 # FIXME: nash die die die
 exec switch_root
 # davej doesn't like initrd bugs
-- 
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 31/31] Some dracut cleanups and bashification.
       [not found] ` <5a1ca330d81aeebf879bb7f0950b7ae448f7be22.1234137267.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
                     ` (28 preceding siblings ...)
  2009-02-09  0:36   ` [PATCH 30/31] " Victor Lowther
@ 2009-02-09  0:37   ` Victor Lowther
  2009-02-09 17:15   ` [PATCH 01/31] " Dave Jones
  30 siblings, 0 replies; 39+ messages in thread
From: Victor Lowther @ 2009-02-09  0:37 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA

We no longer require plymouth.  Remove it from the spec.

---
 dracut.spec |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/dracut.spec b/dracut.spec
index c1a1cf9..24f6513 100644
--- a/dracut.spec
+++ b/dracut.spec
@@ -21,7 +21,6 @@ Requires: mktemp
 Requires: mount
 Requires: nash
 Requires: bash
-Requires: plymouth >= 0.6.0-2
 Requires: /usr/bin/eu-readelf
 Obsoletes: mkinitrd < 7.0
 Provides: mkinitrd = 7.0
-- 
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* Re: [PATCH 21/31] Some dracut cleanups and bashification.
       [not found]     ` <f81e4c7fec7010a32da9bd6e98c19eec70874af0.1234137268.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2009-02-09  9:15       ` Karel Zak
  0 siblings, 0 replies; 39+ messages in thread
From: Karel Zak @ 2009-02-09  9:15 UTC (permalink / raw)
  To: Victor Lowther; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA

On Sun, Feb 08, 2009 at 04:36:15PM -0800, Victor Lowther wrote:
> Simplified get_dso_deps
> 
> This takes advantage of several bash specific constructs to make
> get_dso_deps easier to read and understand.
> ---
>  dracut-functions |   85 +++++++++++++++++------------------------------------
>  1 files changed, 27 insertions(+), 58 deletions(-)
> 
> diff --git a/dracut-functions b/dracut-functions
> index 26254a4..d7717d8 100755
> --- a/dracut-functions
> +++ b/dracut-functions
> @@ -21,73 +21,42 @@
>  #       Peter Jones <pjones-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
>  #       Jeremy Katz <katzj-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
>  #       Jakub Jelinek <jakub-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> -#
> -#
>  
>  IF_RTLD=""
>  IF_dynamic=""
>  get_dso_deps() {
>      local bin="$1" ; shift
> +    local FILES=() LDSO NAME IO FILE ADDR I1 n f TLIBDIR
>  
> -    declare -a FILES
> -    declare -a NAMES
> -
> -    local LDSO=$(LANG=C eu-readelf -l $bin 2>/dev/null  |grep interpreter |awk {'print $4;'} |sed -e 's/]$//')
> -    [ -z "$LDSO" -o "$LDSO" == "$bin" ] && local LDSO="$IF_RTLD"
> -    [ -z "$LDSO" -o "$LDSO" == "$bin" ] && return 1
> -    [ -z "$IF_RTLD" ] && IF_RTLD="$LDSO"
> +    LDSO=$(LANG=C eu-readelf -l $bin 2>/dev/null | \
> +	awk '/interpreter/ {print $4}' |sed -e 's/]$//')

    awk '/interpreter/ { sub(/]$/,"",$4); print $4 }'

> +    [[ $LDSO && $LDSO != $bin ]] || LDSO="$IF_RTLD"
> +    [[ $LDSO && $LDSO != $bin ]] || return 1
> +    [[ $IF_RTLD ]] || IF_RTLD="$LDSO"

   IF_RTLD=${IF_RTLD:-"$LDSO"}

-- 
 Karel Zak  <kzak-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [PATCH 23/31] Some dracut cleanups and bashification.
       [not found]     ` <f393f138baf78d7bf99d31a4912b6ae313f1842f.1234137268.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2009-02-09  9:24       ` Karel Zak
  0 siblings, 0 replies; 39+ messages in thread
From: Karel Zak @ 2009-02-09  9:24 UTC (permalink / raw)
  To: Victor Lowther; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA

On Sun, Feb 08, 2009 at 04:36:25PM -0800, Victor Lowther wrote:
> +modcat="/lib/modules/$kernel/modules"
> +instmods() {
> +    local mod mpargs modpath modname cmd
> +    while (($# > 0)); do
> +	mod=${1%.ko}
> +	case $mod in
> +	    =ata) instmods $mpargs $(cat "${modcat}.block" |egrep 'ata|ahci');;

 grep(1) is smart enough to open and read files :-)

    $(egrep 'ata|ahci' "${modcat}.block")

-- 
 Karel Zak  <kzak-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [PATCH 01/31] Some dracut cleanups and bashification.
       [not found] ` <5a1ca330d81aeebf879bb7f0950b7ae448f7be22.1234137267.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
                     ` (29 preceding siblings ...)
  2009-02-09  0:37   ` [PATCH 31/31] " Victor Lowther
@ 2009-02-09 17:15   ` Dave Jones
       [not found]     ` <20090209171521.GA3646-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  30 siblings, 1 reply; 39+ messages in thread
From: Dave Jones @ 2009-02-09 17:15 UTC (permalink / raw)
  To: Victor Lowther; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA

On Sun, Feb 08, 2009 at 04:34:41PM -0800, Victor Lowther wrote:
 > Hi, I enjoy hacking on system infrastructure and am a bash programming 
 > aficionado. With that in mind, I present this patch series against current
 > master -- it simplifies several bits of code and shaves about 200 lines out
 > of the codebase.  The final result has been tested on a Fedora 10 box that
 > uses lvm on top of dm-crypt, and it works fine.  I have not tested all
 > intermediate steps -- life is too short.

The introduction of additional bashisms is something I'm not sold on.
Others have already expressed concern over what we have already,
so I think making it unnecessarily harder to switch to an alternative
shell may not be the best plan, especially when the benefits aren't
really that great.

Thanks for taking the time to get involved though, it's good to see
people actually playing with the code.

	Dave

-- 
http://www.codemonkey.org.uk
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [PATCH 01/31] Some dracut cleanups and bashification.
       [not found]     ` <20090209171521.GA3646-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2009-02-09 18:57       ` Victor Lowther
       [not found]         ` <7FE9B1BD-31DA-4605-9881-3C42A05075E3-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 39+ messages in thread
From: Victor Lowther @ 2009-02-09 18:57 UTC (permalink / raw)
  To: Dave Jones; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA

On Feb 9, 2009, at 11:15 AM, Dave Jones <davej-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:

> On Sun, Feb 08, 2009 at 04:34:41PM -0800, Victor Lowther wrote:
>> Hi, I enjoy hacking on system infrastructure and am a bash  
>> programming
>> aficionado. With that in mind, I present this patch series against  
>> current
>> master -- it simplifies several bits of code and shaves about 200  
>> lines out
>> of the codebase.  The final result has been tested on a Fedora 10  
>> box that
>> uses lvm on top of dm-crypt, and it works fine.  I have not tested  
>> all
>> intermediate steps -- life is too short.
>
> The introduction of additional bashisms is something I'm not sold on.

Well, it seems that most of the concern about bashisms has to do with  
the code that ends up on the initrd. Making that code strictly posix  
is probably a good thing.

There is no real benifit in having the initrd generating code be  
strictly posix, IMHO. It could be written in C, python, haskell, or  
INTERCAL.

> Others have already expressed concern over what we have already,
> so I think making it unnecessarily harder to switch to an alternative
> shell may not be the best plan, especially when the benefits aren't
> really that great.

Yeah, having the bits that end up in the initrd be posix is a good  
design constraint.

> Thanks for taking the time to get involved though, it's good to see
> people actually playing with the code.

Indeed.

>
>    Dave
>
> -- 
> http://www.codemonkey.org.uk
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [PATCH 01/31] Some dracut cleanups and bashification.
       [not found]         ` <7FE9B1BD-31DA-4605-9881-3C42A05075E3-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2009-02-09 19:13           ` Dave Jones
       [not found]             ` <20090209191333.GA8665-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  2009-02-10 12:17           ` maximilian attems
  1 sibling, 1 reply; 39+ messages in thread
From: Dave Jones @ 2009-02-09 19:13 UTC (permalink / raw)
  To: Victor Lowther; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA

On Mon, Feb 09, 2009 at 12:57:15PM -0600, Victor Lowther wrote:

>> The introduction of additional bashisms is something I'm not sold on.
>
> Well, it seems that most of the concern about bashisms has to do with  
> the code that ends up on the initrd. Making that code strictly posix is 
> probably a good thing.
>
> There is no real benifit in having the initrd generating code be  
> strictly posix, IMHO. It could be written in C, python, haskell, or  
> INTERCAL.

Good point.   I admit my comment was a knee-jerk reaction from reading
the first post without having read the whole patchset.

	Dave

-- 
http://www.codemonkey.org.uk
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [PATCH 01/31] Some dracut cleanups and bashification.
       [not found]             ` <20090209191333.GA8665-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2009-02-09 21:32               ` Victor Lowther
  0 siblings, 0 replies; 39+ messages in thread
From: Victor Lowther @ 2009-02-09 21:32 UTC (permalink / raw)
  To: Dave Jones; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA

On Feb 9, 2009, at 1:13 PM, Dave Jones <davej-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:

> On Mon, Feb 09, 2009 at 12:57:15PM -0600, Victor Lowther wrote:
>
>>> The introduction of additional bashisms is something I'm not sold  
>>> on.
>>
>> Well, it seems that most of the concern about bashisms has to do with
>> the code that ends up on the initrd. Making that code strictly  
>> posix is
>> probably a good thing.
>>
>> There is no real benifit in having the initrd generating code be
>> strictly posix, IMHO. It could be written in C, python, haskell, or
>> INTERCAL.
>
> Good point.   I admit my comment was a knee-jerk reaction from reading
> the first post without having read the whole patchset.

Well, this patchset does introduce bashisms in init. I have another  
that takes them out at the same time it adds three hook points. More  
details later.

>
>    Dave
>
> -- 
> http://www.codemonkey.org.uk
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [PATCH 01/31] Some dracut cleanups and bashification.
       [not found]         ` <7FE9B1BD-31DA-4605-9881-3C42A05075E3-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2009-02-09 19:13           ` Dave Jones
@ 2009-02-10 12:17           ` maximilian attems
       [not found]             ` <20090210121745.GC15532-U9r9yeDMy7A@public.gmane.org>
  1 sibling, 1 reply; 39+ messages in thread
From: maximilian attems @ 2009-02-10 12:17 UTC (permalink / raw)
  To: Victor Lowther; +Cc: Dave Jones, initramfs-u79uwXL29TY76Z2rM5mHXA

On Mon, 09 Feb 2009, Victor Lowther wrote:

> Yeah, having the bits that end up in the initrd be posix is a good  
> design constraint.

yep, please test with dash before introducing further bashism.


--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [PATCH 01/31] Some dracut cleanups and bashification.
       [not found]             ` <20090210121745.GC15532-U9r9yeDMy7A@public.gmane.org>
@ 2009-02-10 16:56               ` Victor Lowther
  0 siblings, 0 replies; 39+ messages in thread
From: Victor Lowther @ 2009-02-10 16:56 UTC (permalink / raw)
  To: maximilian attems; +Cc: Dave Jones, initramfs-u79uwXL29TY76Z2rM5mHXA

On Feb 10, 2009, at 6:17 AM, maximilian attems <max-U9r9yeDMy7A@public.gmane.org> wrote:

> On Mon, 09 Feb 2009, Victor Lowther wrote:
>
>> Yeah, having the bits that end up in the initrd be posix is a good
>> design constraint.
>
> yep, please test with dash before introducing further bashism.

Will do, at least for the bits that get installed on the initrd. 
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 39+ messages in thread

end of thread, other threads:[~2009-02-10 16:56 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-09  0:34 [PATCH 01/31] Some dracut cleanups and bashification Victor Lowther
     [not found] ` <5a1ca330d81aeebf879bb7f0950b7ae448f7be22.1234137267.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-02-09  0:34   ` [PATCH 02/31] " Victor Lowther
2009-02-09  0:34   ` [PATCH 03/31] " Victor Lowther
2009-02-09  0:34   ` [PATCH 04/31] " Victor Lowther
2009-02-09  0:35   ` [PATCH 05/31] " Victor Lowther
2009-02-09  0:35   ` [PATCH 06/31] " Victor Lowther
2009-02-09  0:35   ` [PATCH 07/31] " Victor Lowther
2009-02-09  0:35   ` [PATCH 08/31] " Victor Lowther
2009-02-09  0:35   ` [PATCH 09/31] " Victor Lowther
2009-02-09  0:35   ` [PATCH 10/31] " Victor Lowther
2009-02-09  0:35   ` [PATCH 11/31] " Victor Lowther
2009-02-09  0:35   ` [PATCH 12/31] " Victor Lowther
2009-02-09  0:35   ` [PATCH 13/31] " Victor Lowther
2009-02-09  0:35   ` [PATCH 14/31] " Victor Lowther
2009-02-09  0:35   ` [PATCH 15/31] " Victor Lowther
2009-02-09  0:35   ` [PATCH 16/31] " Victor Lowther
2009-02-09  0:35   ` [PATCH 17/31] " Victor Lowther
2009-02-09  0:36   ` [PATCH 18/31] " Victor Lowther
2009-02-09  0:36   ` [PATCH 19/31] " Victor Lowther
2009-02-09  0:36   ` [PATCH 20/31] " Victor Lowther
2009-02-09  0:36   ` [PATCH 21/31] " Victor Lowther
     [not found]     ` <f81e4c7fec7010a32da9bd6e98c19eec70874af0.1234137268.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-02-09  9:15       ` Karel Zak
2009-02-09  0:36   ` [PATCH 22/31] " Victor Lowther
2009-02-09  0:36   ` [PATCH 23/31] " Victor Lowther
     [not found]     ` <f393f138baf78d7bf99d31a4912b6ae313f1842f.1234137268.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-02-09  9:24       ` Karel Zak
2009-02-09  0:36   ` [PATCH 24/31] " Victor Lowther
2009-02-09  0:36   ` [PATCH 25/31] " Victor Lowther
2009-02-09  0:36   ` [PATCH 26/31] " Victor Lowther
2009-02-09  0:36   ` [PATCH 27/31] " Victor Lowther
2009-02-09  0:36   ` [PATCH 28/31] " Victor Lowther
2009-02-09  0:36   ` [PATCH 29/31] " Victor Lowther
2009-02-09  0:36   ` [PATCH 30/31] " Victor Lowther
2009-02-09  0:37   ` [PATCH 31/31] " Victor Lowther
2009-02-09 17:15   ` [PATCH 01/31] " Dave Jones
     [not found]     ` <20090209171521.GA3646-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-02-09 18:57       ` Victor Lowther
     [not found]         ` <7FE9B1BD-31DA-4605-9881-3C42A05075E3-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-02-09 19:13           ` Dave Jones
     [not found]             ` <20090209191333.GA8665-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-02-09 21:32               ` Victor Lowther
2009-02-10 12:17           ` maximilian attems
     [not found]             ` <20090210121745.GC15532-U9r9yeDMy7A@public.gmane.org>
2009-02-10 16:56               ` Victor Lowther

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.