diff options
author | Nicolás Reynolds <apoyosis@correo.inta.gob.ar> | 2011-08-21 20:42:53 -0300 |
---|---|---|
committer | Nicolás Reynolds <apoyosis@correo.inta.gob.ar> | 2011-08-21 20:42:53 -0300 |
commit | 64a660adb9a1ad658874759c186e0e9cbf138e63 (patch) | |
tree | 310ed3d87e92f803f9951e7bc402bf616339e3ff /configs/releng/root-image/etc/rc.d/functions.d | |
parent | be5fc1d5c788df0f2d8d050e97581977caf133a3 (diff) | |
parent | aca6dbaec9cc8af34ffad79b48054ac6b405174c (diff) |
Merge branch 'master' of https://projects.archlinux.org/git/archiso
Conflicts:
configs/releng/packages.i686
configs/releng/packages.x86_64
Diffstat (limited to 'configs/releng/root-image/etc/rc.d/functions.d')
3 files changed, 36 insertions, 2 deletions
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/functions.d/setup_special_console b/configs/releng/root-image/etc/rc.d/functions.d/setup_special_console new file mode 100644 index 0000000..7badfe3 --- /dev/null +++ b/configs/releng/root-image/etc/rc.d/functions.d/setup_special_console @@ -0,0 +1,25 @@ +# If an alternate console was specified on the kernel command line, +# start agetty on it too. +setup_special_console() +{ + local cmdline_console + if cmdline_console=$(kernel_cmdline console); then + stat_busy "Starting agetty on console: ${cmdline_console}" + local port options baud rts + port=${cmdline_console%%,*} + options=${cmdline_console#${port}} + options=${options#,} + baud=${options%%[neo]*} + [[ ${options} == *r ]] && rts="-h" + if ! grep -q "^${port}" /etc/securetty; then + echo ${port} >> /etc/securetty + fi + if ! grep -q "^z0:" /etc/inittab; then + echo "z0:2345:respawn:/sbin/agetty -8 -s ${rts} ${baud:-9600} ${port} linux" >> /etc/inittab + fi + /sbin/telinit q + stat_done + fi +} + +add_hook sysinit_end setup_special_console |