diff options
author | Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> | 2011-08-17 20:26:17 -0300 |
---|---|---|
committer | Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> | 2011-08-18 17:09:00 -0300 |
commit | a9c02d94881fdf542ffc6ea0525c4726f66f0870 (patch) | |
tree | 3e9d2763bcf0e6027b54a61c4119f4cb496d7dbc /configs | |
parent | b16088ba7e39442937cca8ff204dbe0ae83440d5 (diff) |
[configs/releng] Replace rc.d/archiso with initscripts hooks.
In this way:
* Prepare locales requested by boot param mostly early possible.
* Setup special console at end of rc.sysinit
Remove unneded include from automated_script (already included by rc.conf)
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
Diffstat (limited to 'configs')
-rw-r--r-- | configs/releng/root-image/etc/rc.conf | 2 | ||||
-rw-r--r-- | configs/releng/root-image/etc/rc.d/functions.d/automated_script | 2 | ||||
-rw-r--r-- | configs/releng/root-image/etc/rc.d/functions.d/prepare_locale_gen | 11 | ||||
-rw-r--r--[-rwxr-xr-x] | configs/releng/root-image/etc/rc.d/functions.d/setup_special_console (renamed from configs/releng/root-image/etc/rc.d/archiso) | 26 |
4 files changed, 15 insertions, 26 deletions
diff --git a/configs/releng/root-image/etc/rc.conf b/configs/releng/root-image/etc/rc.conf index 42084f6..a3e3d8a 100644 --- a/configs/releng/root-image/etc/rc.conf +++ b/configs/releng/root-image/etc/rc.conf @@ -30,4 +30,4 @@ USELVM="no" HOSTNAME="archiso" -DAEMONS=(hwclock syslog-ng archiso) +DAEMONS=(hwclock syslog-ng) diff --git a/configs/releng/root-image/etc/rc.d/functions.d/automated_script b/configs/releng/root-image/etc/rc.d/functions.d/automated_script index edb8ea3..7a35acb 100644 --- a/configs/releng/root-image/etc/rc.d/functions.d/automated_script +++ b/configs/releng/root-image/etc/rc.d/functions.d/automated_script @@ -1,5 +1,3 @@ -. /etc/archiso/functions - automated_script () { script="$(kernel_cmdline script)" diff --git a/configs/releng/root-image/etc/rc.d/functions.d/prepare_locale_gen b/configs/releng/root-image/etc/rc.d/functions.d/prepare_locale_gen new file mode 100644 index 0000000..47ed79d --- /dev/null +++ b/configs/releng/root-image/etc/rc.d/functions.d/prepare_locale_gen @@ -0,0 +1,11 @@ +prepare_locale_gen () +{ + if [[ ${LOCALE} != "en_US.UTF-8" ]]; then + stat_busy "Generating locales..." + sed -i "s/#\(${LOCALE/[@.]*}\)/\1/" /etc/locale.gen + /usr/sbin/locale-gen > /dev/null + stat_done + fi +} + +add_hook sysinit_postmount prepare_locale_gen diff --git a/configs/releng/root-image/etc/rc.d/archiso b/configs/releng/root-image/etc/rc.d/functions.d/setup_special_console index cc930f6..7badfe3 100755..100644 --- a/configs/releng/root-image/etc/rc.d/archiso +++ b/configs/releng/root-image/etc/rc.d/functions.d/setup_special_console @@ -1,20 +1,6 @@ -# vim: set ft=sh: -. /etc/rc.conf -. /etc/rc.d/functions - -do_locale_gen () -{ - if [[ ${LOCALE} != "en_US.UTF-8" ]]; then - stat_busy "Generating locales..." - sed -i "s/#\(${LOCALE/[@.]*}\)/\1/" /etc/locale.gen - /usr/sbin/locale-gen > /dev/null - stat_done - fi -} - # If an alternate console was specified on the kernel command line, # start agetty on it too. -do_special_console() +setup_special_console() { local cmdline_console if cmdline_console=$(kernel_cmdline console); then @@ -24,7 +10,7 @@ do_special_console() options=${cmdline_console#${port}} options=${options#,} baud=${options%%[neo]*} - [[ ${options} =~ r$ ]] && rts="-h" + [[ ${options} == *r ]] && rts="-h" if ! grep -q "^${port}" /etc/securetty; then echo ${port} >> /etc/securetty fi @@ -36,10 +22,4 @@ do_special_console() fi } -case "$1" in - start) - do_locale_gen - do_special_console - ;; -esac -exit 0 +add_hook sysinit_end setup_special_console |