File: 10-misc

package info (click to toggle)
fai 3.1.8
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,144 kB
  • ctags: 164
  • sloc: sh: 3,410; perl: 1,780; makefile: 113
file content (39 lines) | stat: -rwxr-xr-x 1,119 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#! /bin/bash

# (c) Thomas Lange, 2001-2007, lange@debian.org

error=0 ; trap "error=$((error|1))" ERR

# a list of modules which are loaded at boot time
fcopy -i /etc/modules
for module in $MODULESLIST; do
    ainsl -a $target/etc/modules "^$module$"
done

# disable fsck on ext3 filesystems
for part in $(mount|grep $target |grep "type ext3"|perl -ane 'print "$F[0] "')
do
    echo "Disable periodic fsck on $part"
    tune2fs -c 0 -i 0 $part
done

fcopy /etc/hostname || echo $HOSTNAME     > $target/etc/hostname
echo $TIMEZONE    > $target/etc/timezone
ln -fs /usr/share/zoneinfo/${TIMEZONE} $target/etc/localtime

fcopy -iM /etc/hosts /etc/motd

# set root password
echo "root:$ROOTPW" | $ROOTCMD chpasswd --encrypted
# make /root accessible only by root
chmod 0700 $target/root
chown root:root $target/root
# copy default dotfiles for root account
fcopy -ir /root

# create keyboard layout table
$ROOTCMD bash -c "echo 'console-data console-data/keymap/full select $KEYMAP' | debconf-set-selections"
$ROOTCMD install-keymap $KEYMAP || true
# dumpkeys | gzip -9f >$target/etc/console/boottime.kmap.gz

exit $error