config_timezone: added some more error handling and adjust return value 0.7.12
authorMichael Prokop <mika@grml.org>
Thu, 2 Aug 2007 09:01:56 +0000 (11:01 +0200)
committerMichael Prokop <mika@grml.org>
Thu, 2 Aug 2007 09:01:56 +0000 (11:01 +0200)
autoconfig.functions
debian/changelog

index 317323c..4cb5a65 100755 (executable)
@@ -4,7 +4,7 @@
 # Authors:       grml-team (grml.org), (c) Klaus Knopper <knopper@knopper.net>, (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2.
-# Latest change: Mit Jul 25 18:59:49 CEST 2007 [mika]
+# Latest change: Don Aug 02 11:01:10 CEST 2007 [mika]
 ################################################################################
 
 # {{{ path, variables, signals, umask, zsh
@@ -444,11 +444,13 @@ update_progress(){
 config_timezone(){
  # don't touch the files if running from harddisk:
  if [ -z "$INSTALLED" ]; then
-  einfo "Setting timezone."
-  KTZ="$(getbootparam tz 2>>$DEBUG)"
-  [ -f "/usr/share/zoneinfo/$KTZ" ] && TZ="$KTZ"
-  rm -f /etc/localtime
-  cp "/usr/share/zoneinfo/$TZ" /etc/localtime && eend 0
+    KTZ="$(getbootparam tz 2>>$DEBUG)"
+    if [ -n "$KTZ" ] ; then
+       einfo "Setting timezone."
+       [ -f "/usr/share/zoneinfo/$KTZ" ] && TZ="$KTZ"
+       rm -f /etc/localtime
+       cp "/usr/share/zoneinfo/$TZ" /etc/localtime ; eend $?
+    fi
  fi
 }
 # }}}
index 0d889dd..897e6ff 100644 (file)
@@ -1,3 +1,9 @@
+grml-autoconfig (0.7.12) unstable; urgency=low
+
+  * config_timezone: added some more error handling and adjust return value.
+
+ -- Michael Prokop <mika@grml.org>  Thu, 02 Aug 2007 11:01:18 +0200
+
 grml-autoconfig (0.7.11) unstable; urgency=low
 
   * Rename bootoption splash into "textsplash" (and additionally