2d1f8014 |
1 | #! /bin/bash |
2 | |
3 | # (c) Thomas Lange, 2001-2008, lange@debian.org |
4 | |
5 | error=0 ; trap "error=$((error|1))" ERR |
6 | |
7 | # a list of modules which are loaded at boot time |
8 | fcopy -i /etc/modules |
9 | for module in $MODULESLIST; do |
10 | ainsl -a $target/etc/modules "^$module$" |
11 | done |
12 | |
13 | fcopy /etc/hostname || echo $HOSTNAME > $target/etc/hostname |
14 | echo $TIMEZONE > $target/etc/timezone |
15 | ln -fs /usr/share/zoneinfo/${TIMEZONE} $target/etc/localtime |
16 | |
17 | if [ -n "$IPADDR" ]; then |
18 | ifclass DHCPC || ainsl -s $FAI_ROOT/etc/hosts "$IPADDR $HOSTNAME.$DOMAIN $HOSTNAME" |
19 | fi |
20 | |
21 | fcopy -iM /etc/hosts /etc/motd |
22 | |
23 | # set root password |
24 | #echo "root:$ROOTPW" | $ROOTCMD chpasswd --encrypted |
25 | $ROOTCMD usermod -p "$ROOTPW" root |
26 | # make /root accessible only by root |
27 | chmod 0700 $target/root |
28 | chown root:root $target/root |
29 | # copy default dotfiles for root account |
30 | fcopy -ir /root |
31 | |
32 | # create keyboard layout table |
33 | $ROOTCMD bash -c "echo 'console-data console-data/keymap/full select $KEYMAP' | debconf-set-selections" |
34 | $ROOTCMD install-keymap $KEYMAP || true |
35 | # dumpkeys | gzip -9f >$target/etc/console/boottime.kmap.gz |
36 | |
37 | exit $error |