[arch-releng] [PATCH] Adjust rc.conf for recent initscripts changes
Pierre Schmitz
pierre at archlinux.de
Sat Jul 28 05:47:14 EDT 2012
* We use a rc.conf file loser to the upstream default.
* rc.conf settings such as LOCALE are no longer interpreted as Bash.
We have to remove the "override from the boot prompt" feature for now.
* Use the recommend config files to setup hostname, locale, timezone and console
Signed-off-by: Pierre Schmitz <pierre at archlinux.de>
---
We are going to loose some kernel prompt features here. We still should apply this for now as we do not make use of this feature atm and the iso is currently broken otherwise.
In future we should avoid injecting code into rc.conf.
README | 18 --------
configs/releng/build.sh | 1 +
configs/releng/root-image/etc/hostname | 1 +
configs/releng/root-image/etc/locale.conf | 1 +
configs/releng/root-image/etc/rc.conf | 48 +++++++++-------------
.../etc/rc.d/functions.d/prepare_locale_gen | 11 -----
configs/releng/root-image/etc/timezone | 1 +
configs/releng/root-image/etc/vconsole.conf | 1 +
8 Dateien geändert, 24 Zeilen hinzugefügt(+), 58 Zeilen entfernt(-)
create mode 100644 configs/releng/root-image/etc/hostname
create mode 100644 configs/releng/root-image/etc/locale.conf
delete mode 100644 configs/releng/root-image/etc/rc.d/functions.d/prepare_locale_gen
create mode 100644 configs/releng/root-image/etc/timezone
create mode 100644 configs/releng/root-image/etc/vconsole.conf
diff --git a/README b/README
index 00ac59e..46350a3 100644
--- a/README
+++ b/README
@@ -145,24 +145,6 @@ INDEX
-*** Boot parameters (only for configs/releng)
-
-** /etc/rc.conf
-
-By default these parameters are set by default to these values
-if nothing is specified on command line.
-
-* locale= "en_US.UTF-8"
-* daemon_locale= "no"
-* hardwareclock= "UTC"
-* timezone= "UTC"
-* keymap= "us"
-* consolefont= (unset)
-* consolemap= (unset)
-* usecolor= "yes"
-
-
-
*** Transfer ISO image to target medium (configs/releng)
ISO images names consist of: archlinux-<YYYY>.<MM>.<DD>-<TYPE>-<ARCH>.iso
diff --git a/configs/releng/build.sh b/configs/releng/build.sh
index b9109b0..6e466c0 100755
--- a/configs/releng/build.sh
+++ b/configs/releng/build.sh
@@ -149,6 +149,7 @@ make_customize_root_image() {
sed -i "s/#Server/Server/g" ${work_dir}/root-image/etc/pacman.d/mirrorlist
patch ${work_dir}/root-image/usr/bin/pacman-key < ${script_path}/pacman-key-4.0.3_unattended-keyring-init.patch
sed -i 's/#\(en_US\.UTF-8\)/\1/' ${work_dir}/root-image/etc/locale.gen
+ ln -s /usr/share/zoneinfo/UTC ${work_dir}/root-image/etc/localtime
cp -a ${work_dir}/root-image/etc/skel/.[^\.]* ${work_dir}/root-image/root/
mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" \
-r 'locale-gen' \
diff --git a/configs/releng/root-image/etc/hostname b/configs/releng/root-image/etc/hostname
new file mode 100644
index 0000000..2dbe21e
--- /dev/null
+++ b/configs/releng/root-image/etc/hostname
@@ -0,0 +1 @@
+archiso
diff --git a/configs/releng/root-image/etc/locale.conf b/configs/releng/root-image/etc/locale.conf
new file mode 100644
index 0000000..01ec548
--- /dev/null
+++ b/configs/releng/root-image/etc/locale.conf
@@ -0,0 +1 @@
+LANG=en_US.UTF-8
diff --git a/configs/releng/root-image/etc/rc.conf b/configs/releng/root-image/etc/rc.conf
index d8dedec..f97ec88 100644
--- a/configs/releng/root-image/etc/rc.conf
+++ b/configs/releng/root-image/etc/rc.conf
@@ -1,33 +1,23 @@
-#
-# /etc/rc.conf - Main Configuration for Arch Linux
-
. /etc/archiso/functions
+#
+# /etc/rc.conf - configuration file for initscripts
+#
+# Most of rc.conf has been replaced by various other configuration
+# files. See archlinux(7) for details.
+#
+# For more details on rc.conf see rc.conf(5).
+#
-LOCALE_DEFAULT="en_US.UTF-8"
-DAEMON_LOCALE_DEFAULT="no"
-CLOCK_DEFAULT="UTC"
-TIMEZONE_DEFAULT="UTC"
-KEYMAP_DEFAULT="us"
-CONSOLEFONT_DEFAULT=
-CONSOLEMAP_DEFAULT=
-USECOLOR_DEFAULT="yes"
-
-LOCALE="$(kernel_cmdline locale ${LOCALE_DEFAULT})"
-DAEMON_LOCALE="$(kernel_cmdline daemon_locale ${DAEMON_LOCALE_DEFAULT})"
-HARDWARECLOCK="$(kernel_cmdline clock ${CLOCK_DEFAULT})"
-TIMEZONE="$(kernel_cmdline timezone ${TIMEZONE_DEFAULT})"
-KEYMAP="$(kernel_cmdline keymap ${KEYMAP_DEFAULT})"
-CONSOLEFONT="$(kernel_cmdline consolefont ${CONSOLEFONT_DEFAULT})"
-CONSOLEMAP="$(kernel_cmdline consolemap ${CONSOLEMAP_DEFAULT})"
-USECOLOR="$(kernel_cmdline usecolor ${USECOLOR_DEFAULT})"
-
-MODULES=()
-
-UDEV_TIMEOUT=30
-USEDMRAID="no"
-USEBTRFS="no"
-USELVM="no"
+DAEMONS=(syslog-ng haveged pacman-init)
-HOSTNAME="archiso"
+# Storage
+#
+# USEDMRAID="no"
+# USELVM="no"
-DAEMONS=(hwclock syslog-ng haveged pacman-init)
+# Network
+#
+# interface=
+# address=
+# netmask=
+# gateway=
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
deleted file mode 100644
index 47ed79d..0000000
--- a/configs/releng/root-image/etc/rc.d/functions.d/prepare_locale_gen
+++ /dev/null
@@ -1,11 +0,0 @@
-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/timezone b/configs/releng/root-image/etc/timezone
new file mode 100644
index 0000000..e2e7775
--- /dev/null
+++ b/configs/releng/root-image/etc/timezone
@@ -0,0 +1 @@
+UTC
diff --git a/configs/releng/root-image/etc/vconsole.conf b/configs/releng/root-image/etc/vconsole.conf
new file mode 100644
index 0000000..12b81a1
--- /dev/null
+++ b/configs/releng/root-image/etc/vconsole.conf
@@ -0,0 +1 @@
+KEYMAP=us
--
1.7.11.3
More information about the arch-releng
mailing list