[PATCH 29/31] Some dracut cleanups and bashification.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux