---
 examples/hooks/defaultpasswords |    2 ++
 examples/hooks/timezone         |    9 ++++++---
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/examples/hooks/defaultpasswords b/examples/hooks/defaultpasswords
index b2296ce..02fbd22 100755
--- a/examples/hooks/defaultpasswords
+++ b/examples/hooks/defaultpasswords
@@ -2,6 +2,8 @@
 #
 # This is an example script that sets the root pasword to a given default

+# depending on your version of passwd, chpasswd can use the -e flag
to handle en encrypted password. you probably want to use that.
+
 cat $(dirname $0)/confdata/defaultpasswords | chroot $TARGET chpasswd


diff --git a/examples/hooks/timezone b/examples/hooks/timezone
index ff6c968..2214c7c 100755
--- a/examples/hooks/timezone
+++ b/examples/hooks/timezone
@@ -1,8 +1,11 @@
 #!/bin/sh
 #
-# This is an example script that sets the timezone to a given default
+# This is an example script that sets the timezone to a given
default, or to the one of the host is none is configured

-cp confdata/timezone $TARGET/etc/
-chroot $TARGET dpkg-reconfigure --frontend noninteractive tzdata
+if [ -r confdata/timezone ]
+then   cp confdata/timezone $TARGET/etc/
+else   cp /etc/timezone $TARGET/etc/
+fi

+chroot $TARGET dpkg-reconfigure --frontend noninteractive tzdata

-- 
1.7.0.4

Reply via email to