* [PATCH 07/11] dash echo does not support -e option
@ 2009-05-15 12:39 Harald Hoyer
[not found] ` <4A0D6294.1040509-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Harald Hoyer @ 2009-05-15 12:39 UTC (permalink / raw)
To: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
[-- Attachment #1: Type: text/plain, Size: 235 bytes --]
use /bin/echo, instead of dash builtin echo
do not use "sh -c"
---
modules.d/95rootfs-block-udev/genrules.sh | 9 ++++-----
modules.d/95rootfs-block-udev/install | 1 +
2 files changed, 5 insertions(+), 5 deletions(-)
[-- Attachment #2: e419faf652b7323963df00046b0fa6109ea6d12e.diff --]
[-- Type: text/x-patch, Size: 1677 bytes --]
diff --git a/modules.d/95rootfs-block-udev/genrules.sh b/modules.d/95rootfs-block-udev/genrules.sh
index d4e226c..0b42483 100755
--- a/modules.d/95rootfs-block-udev/genrules.sh
+++ b/modules.d/95rootfs-block-udev/genrules.sh
@@ -1,15 +1,14 @@
resume=$(getarg resume=) && ! getarg noresume && [ -b "$resume" ] && {
- # parsing the output of ls is Bad, but until there is a better way...
(
- echo -e 'KERNEL=="'${resume#/dev/}'", RUN+="/bin/sh -c \047 echo %M:%m > /sys/power/resume \047 "'
- echo -e 'SYMLINK=="'${resume#/dev/}'", RUN+="/bin/sh -c \047 echo %M:%m > /sys/power/resume \047 "'
+ /bin/echo -e 'KERNEL=="'${resume#/dev/}'", RUN+="/bin/echo %M:%m > /sys/power/resume"'
+ /bin/echo -e 'SYMLINK=="'${resume#/dev/}'", RUN+="/bin/echo %M:%m > /sys/power/resume"'
) >> /etc/udev/rules.d/99-resume.rules
}
(
- echo -e 'KERNEL=="'${root#/dev/}'", RUN+="/bin/sh -c \047 mount '$fstype' -o '$rflags' '$root' '$NEWROOT' \047 " '
- echo -e 'SYMLINK=="'${root#/dev/}'", RUN+="/bin/sh -c \047 mount '$fstype' -o '$rflags' '$root' '$NEWROOT' \047 " '
+ echo 'KERNEL=="'${root#/dev/}'", RUN+="/bin/mount '$fstype' -o '$rflags' '$root' '$NEWROOT'" '
+ echo 'SYMLINK=="'${root#/dev/}'", RUN+="/bin/mount '$fstype' -o '$rflags' '$root' '$NEWROOT'" '
) >> /etc/udev/rules.d/99-mount.rules
diff --git a/modules.d/95rootfs-block-udev/install b/modules.d/95rootfs-block-udev/install
index 641e7df..3b02232 100755
--- a/modules.d/95rootfs-block-udev/install
+++ b/modules.d/95rootfs-block-udev/install
@@ -1,3 +1,4 @@
#!/bin/sh
+dracut_install echo
inst_hook pre-udev 10 "$moddir/parse-root-opts.sh"
inst_hook pre-udev 20 "$moddir/genrules.sh"
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 07/11] dash echo does not support -e option
[not found] ` <4A0D6294.1040509-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2009-05-15 14:36 ` Victor Lowther
0 siblings, 0 replies; 2+ messages in thread
From: Victor Lowther @ 2009-05-15 14:36 UTC (permalink / raw)
To: Harald Hoyer; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
If you use printf (which is built in to dash), you do not have to
include the actual echo binary.
On May 15, 2009, at 7:39 AM, Harald Hoyer <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
>
> use /bin/echo, instead of dash builtin echo
> do not use "sh -c"
> ---
> modules.d/95rootfs-block-udev/genrules.sh | 9 ++++-----
> modules.d/95rootfs-block-udev/install | 1 +
> 2 files changed, 5 insertions(+), 5 deletions(-)
>
>
> <e419faf652b7323963df00046b0fa6109ea6d12e.diff>
--
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] 2+ messages in thread
end of thread, other threads:[~2009-05-15 14:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-15 12:39 [PATCH 07/11] dash echo does not support -e option Harald Hoyer
[not found] ` <4A0D6294.1040509-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-05-15 14:36 ` 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.