* [PATCH 1/2] 10i18n: exit if console already initialized
@ 2010-07-26 8:15 Amadeusz Żołnowski
[not found] ` <20100726101540.37af47d8-2qtfh70TtYba5EbDDlwbIw@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Amadeusz Żołnowski @ 2010-07-26 8:15 UTC (permalink / raw)
To: initramfs-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 651 bytes --]
---
modules.d/10i18n/console_init | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/modules.d/10i18n/console_init b/modules.d/10i18n/console_init
index fa74595..0d4fa8f 100755
--- a/modules.d/10i18n/console_init
+++ b/modules.d/10i18n/console_init
@@ -63,12 +63,15 @@ dev_open() {
dev=/dev/${1#/dev/}
+devname=${dev#/dev/}
[ -c "${dev}" ] || {
echo "Usage: $0 device" >&2
exit 1
}
+[ -e /tmp/console_init.${devname} ] && exit 0
+
dev_open ${dev}
for fd in 6 7; do
@@ -85,3 +88,4 @@ set_font ${dev}
set_keymap
dev_close
+>/tmp/console_init.${devname}
--
1.7.1.1
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply related [flat|nested] 3+ messages in thread[parent not found: <20100726101540.37af47d8-2qtfh70TtYba5EbDDlwbIw@public.gmane.org>]
* [PATCH 2/2] 99base: no modprobe and rmmod if --no-kernel [not found] ` <20100726101540.37af47d8-2qtfh70TtYba5EbDDlwbIw@public.gmane.org> @ 2010-07-26 8:17 ` Amadeusz Żołnowski 2010-08-04 16:31 ` [PATCH 1/2] 10i18n: exit if console already initialized Harald Hoyer 1 sibling, 0 replies; 3+ messages in thread From: Amadeusz Żołnowski @ 2010-07-26 8:17 UTC (permalink / raw) To: Amadeusz Żołnowski; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA [-- Attachment #1: Type: text/plain, Size: 1482 bytes --] If we build initramfs without modules, instead of adding modprobe and rmmod, create symlinks to /bin/true to don't produce unnecessary errors. Anyway it's a workaround for following desired behaviour: modprobe tries to insert module only if it's not built into kernel --- modules.d/99base/install | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/modules.d/99base/install b/modules.d/99base/install index 6ba9e7e..0fd84ed 100755 --- a/modules.d/99base/install +++ b/modules.d/99base/install @@ -1,6 +1,13 @@ #!/bin/bash -dracut_install mount mknod mkdir modprobe pidof sleep chroot \ - sed ls flock cp mv dmesg rm ln rmmod mkfifo less +dracut_install mount mknod mkdir pidof sleep chroot \ + sed ls flock cp mv dmesg rm ln mkfifo less +if [[ $no_kernel ]]; then + inst /bin/true + ln -s /bin/true "${initdir}"/sbin/modprobe + ln -s /bin/true "${initdir}"/sbin/rmmod +else + dracut_install modprobe rmmod +fi if [ ! -e "${initdir}/bin/sh" ]; then dracut_install bash (ln -s bash "${initdir}/bin/sh" || :) @@ -18,7 +25,7 @@ if which switch_root >/dev/null 2>&1; then dracut_install switch_root else inst "$moddir/switch_root" "/sbin/switch_root" \ - || derror "Failed to install switch_root" + || derror "Failed to install switch_root" fi inst "$moddir/dracut-lib.sh" "/lib/dracut-lib.sh" inst_hook cmdline 10 "$moddir/parse-root-opts.sh" -- 1.7.1.1 [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] 10i18n: exit if console already initialized [not found] ` <20100726101540.37af47d8-2qtfh70TtYba5EbDDlwbIw@public.gmane.org> 2010-07-26 8:17 ` [PATCH 2/2] 99base: no modprobe and rmmod if --no-kernel Amadeusz Żołnowski @ 2010-08-04 16:31 ` Harald Hoyer 1 sibling, 0 replies; 3+ messages in thread From: Harald Hoyer @ 2010-08-04 16:31 UTC (permalink / raw) To: Amadeusz Żołnowski; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA pushed On 07/26/2010 10:15 AM, Amadeusz Żołnowski wrote: > > --- > modules.d/10i18n/console_init | 4 ++++ > 1 files changed, 4 insertions(+), 0 deletions(-) > > diff --git a/modules.d/10i18n/console_init b/modules.d/10i18n/console_init > index fa74595..0d4fa8f 100755 > --- a/modules.d/10i18n/console_init > +++ b/modules.d/10i18n/console_init > @@ -63,12 +63,15 @@ dev_open() { > > > dev=/dev/${1#/dev/} > +devname=${dev#/dev/} > > [ -c "${dev}" ] || { > echo "Usage: $0 device">&2 > exit 1 > } > > +[ -e /tmp/console_init.${devname} ]&& exit 0 > + > dev_open ${dev} > > for fd in 6 7; do > @@ -85,3 +88,4 @@ set_font ${dev} > set_keymap > > dev_close > +>/tmp/console_init.${devname} ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-08-04 16:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-26 8:15 [PATCH 1/2] 10i18n: exit if console already initialized Amadeusz Żołnowski
[not found] ` <20100726101540.37af47d8-2qtfh70TtYba5EbDDlwbIw@public.gmane.org>
2010-07-26 8:17 ` [PATCH 2/2] 99base: no modprobe and rmmod if --no-kernel Amadeusz Żołnowski
2010-08-04 16:31 ` [PATCH 1/2] 10i18n: exit if console already initialized Harald Hoyer
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.