Skip to content

Commit baac937

Browse files
the-maldridgeclassabbyamp
authored andcommitted
dracut/autoinstaller: Manipulate /etc/rc.conf less
1 parent 9d681c6 commit baac937

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

dracut/autoinstaller/install.sh

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -129,14 +129,12 @@ VAI_configure_hostname() {
129129
}
130130

131131
VAI_configure_rc_conf() {
132-
# Set the value of various tokens
133-
sed -i "s:Europe/Madrid:${timezone}:" "${target}/etc/rc.conf"
134-
sed -i "s:\"es\":\"${keymap}\":" "${target}/etc/rc.conf"
135-
136-
# Activate various tokens
137-
sed -i "s:#HARDWARECLOCK:HARDWARECLOCK:" "${target}/etc/rc.conf"
138-
sed -i "s:#TIMEZONE:TIMEZONE:" "${target}/etc/rc.conf"
139-
sed -i "s:#KEYMAP:KEYMAP:" "${target}/etc/rc.conf"
132+
if [ "${keymap}" != "us" ] ; then
133+
sed -i "s:\"es\":\"${keymap}\":" "${target}/etc/rc.conf"
134+
sed -i "s:#KEYMAP:KEYMAP:" "${target}/etc/rc.conf"
135+
fi
136+
137+
ln -s "/usr/share/zoneinfo/${timezone}" "${target}/etc/localtime"
140138
}
141139

142140
VAI_add_user() {

0 commit comments

Comments
 (0)