summaryrefslogtreecommitdiff
path: root/src/core/libs/lib-misc.sh
diff options
context:
space:
mode:
authorDieter Plaetinck <dieter@plaetinck.be>2010-12-31 16:46:41 +0100
committerDieter Plaetinck <dieter@plaetinck.be>2010-12-31 16:46:41 +0100
commitdbbf5ccabc342f6cedd975378209b0c4af20e5c6 (patch)
treee0845797b2c5369b40ebcb62217444a6249bdb41 /src/core/libs/lib-misc.sh
parentbffae93369818a82f0cbbcbff81939c104699550 (diff)
Inform user more in detail which pre/post-configure step went wrong
* Move all pre/post-configure logic to separate functions (initcpio config, time setting, mirrorlist) * other steps will continue to be run, even if previous one(s) failed * at the end of the pre/post-configure step you will be warned which steps failed, if needed.
Diffstat (limited to 'src/core/libs/lib-misc.sh')
-rw-r--r--src/core/libs/lib-misc.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/libs/lib-misc.sh b/src/core/libs/lib-misc.sh
index b647f2b..177c8b7 100644
--- a/src/core/libs/lib-misc.sh
+++ b/src/core/libs/lib-misc.sh
@@ -141,6 +141,15 @@ target_configure_initial_keymap_font ()
[ -n "$var_CONSOLEFONT" ] && sed -i "s/^CONSOLEFONT=.*/CONSOLEFONT=\"${var_CONSOLEFONT/\.*/}\"/" ${var_TARGET_DIR}/etc/rc.conf
}
+target_configure_time () {
+ # /etc/rc.conf
+ # Make sure timezone and utc info are what we want
+ # NOTE: If a timezone string never contains more then 1 slash, we can use ${TIMEZONE/\//\\/}
+ sed -i -e "s/^TIMEZONE=.*/TIMEZONE=\"${TIMEZONE//\//\\/}\"/g" \
+ -e "s/^HARDWARECLOCK=.*/HARDWARECLOCK=\"$HARDWARECLOCK\"/g" \
+ ${var_TARGET_DIR}/etc/rc.conf
+}
+
# apped string after last line matching regex in a file.
# $1 regex
# $2 string (can contain "\n", "\t" etc)