The recent hooks additions are not style compliant (gasp!). Fix this.
We might also want to fix missing copyright headers, but not sure
about that.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
#!/bin/sh
#
-# This is an example script that sets the root pasword to a given default
+# 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.
+# Note: 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
-
-
#!/bin/sh
#
-# This is an example script that sets the hostname and hosts file
+# This is an example script that sets the hostname and hosts file.
VMFQDN=$INSTANCE_NAME
VMHOSTNAME=${VMFQDN%%.*}
[ x$VMFQDN -eq x$VMHOSTNAME ] && VMFQDN=""
echo "127.0.1.1 $VMFQDN $VMHOSTNAME" >> $TARGET/etc/host
-
#!/bin/sh
#
-# This is an example script that sets the timezone to a given default, or to the one of the host is none is configured
+# This is an example script that sets the timezone to a given default,
+# or to the one of the host is none is configured.
-if [ -r confdata/timezone ]
-then cp confdata/timezone $TARGET/etc/
-else cp /etc/timezone $TARGET/etc/
+if [ -r confdata/timezone ]; then
+ cp confdata/timezone $TARGET/etc/
+else
+ cp /etc/timezone $TARGET/etc/
fi
chroot $TARGET dpkg-reconfigure --frontend noninteractive tzdata
-