fixed a missing ROOTCMD
[fai-configs.git] / scripts / FAIBASE / 10-misc
CommitLineData
2d1f8014 1#! /bin/bash
2
3# (c) Thomas Lange, 2001-2008, lange@debian.org
4
5error=0 ; trap "error=$((error|1))" ERR
6
7# a list of modules which are loaded at boot time
8fcopy -i /etc/modules
9for module in $MODULESLIST; do
10 ainsl -a $target/etc/modules "^$module$"
11done
12
13fcopy /etc/hostname || echo $HOSTNAME > $target/etc/hostname
14echo $TIMEZONE > $target/etc/timezone
15ln -fs /usr/share/zoneinfo/${TIMEZONE} $target/etc/localtime
16
17if [ -n "$IPADDR" ]; then
18 ifclass DHCPC || ainsl -s $FAI_ROOT/etc/hosts "$IPADDR $HOSTNAME.$DOMAIN $HOSTNAME"
19fi
20
21fcopy -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
27chmod 0700 $target/root
28chown root:root $target/root
29# copy default dotfiles for root account
30fcopy -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
637d5b43
AE
37locale-gen "en_US.utf8"
38
2d1f8014 39exit $error