3 # (c) Thomas Lange, 2001-2012, lange@debian.org
5 error
=0; trap 'error=$(($?>$error?$?:$error))' ERR
# save maximum error code
7 echo $TIMEZONE > $target/etc
/timezone
8 if [ -L $target/etc
/localtime
]; then
9 ln -sf /usr
/share
/zoneinfo
/${TIMEZONE} $target/etc
/localtime
11 cp -f /usr
/share
/zoneinfo
/${TIMEZONE} $target/etc
/localtime
14 if [ -n "$IPADDR" ]; then
15 ifclass DHCPC || ainsl
-s /etc
/hosts
"$IPADDR $HOSTNAME.$DOMAIN $HOSTNAME"
17 ifclass DHCPC
&& ainsl
-s /etc
/hosts
"127.0.0.1 $HOSTNAME"
20 if [ -f $target/etc
/hosts.orig
]; then
21 mv $target/etc
/hosts.orig
$target/etc
/hosts
23 fcopy
-iM /etc
/hosts
/etc
/motd
25 # make /root accessible only by root
26 chmod -c 0700 $target/root
27 chown
-c root
:root
$target/root
28 # copy default dotfiles for root account
31 chmod -c 1777 ${target}/tmp
32 chown
-c 0:0 ${target}/tmp