-# install already shipped debs
-[ -e /mirror ] || ln -s /home/ubuntu-mirror /mirror
-mount -o loop /home/martin/download/ubuntu/gutsy-alternate-amd64.iso /cdrom
-apt-cdrom -m add
-DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential fakeroot devscripts mutt postfix openssh-server
-
-dpkg -i ~martin/download/afio*.deb || exit 1
-
-# configuration files
-mkdir -p /var/backups/pibackup/
-[ -e /home/full*.cpio ] && mv /home/full*.cpio /var/backups/pibackup/ || true
-
-CURBACKUP=`ls -t /var/backups/pibackup/full* | head -n 1`
-[ -e "$CURBACKUP" ] || {
- echo no current full backup in /var/backups/pibackup
- exit 1
-}
-cd /
-afio -iZ -y '/etc/*' -Y /etc/passwd -Y /etc/group -Y /etc/shadow -Y /etc/fstab $CURBACKUP
-
-# only restore dchroot part into fstab
-cd /tmp
-afio -iZ -y /etc/fstab $CURBACKUP
-grep -A 200 "^# dchroots" /tmp/etc/fstab >> /etc/fstab
-rm -rf /tmp/etc
-
-newaliases
-/etc/init.d/postfix restart
-
-# install users
-cat <<EOF >> /etc/passwd
-joe:x:1001:1001:Joe User,,,:/home/joe:/bin/bash
-netti:x:1002:1002:Annett Kittel,,,:/home/netti:/bin/bash
-EOF
-cat <<EOF >> /etc/shadow
-joe:$1$7t1pZTyL$lI7.B/9DtPa6y2BD8wTNZ/:13060:0:99999:7:::
-netti:$1$5uq6X7u0$92yOfMH2Nh89Ui.hbaEDp/:12930:0:99999:7:::
-EOF
-cat <<EOF >> /etc/group
-joe:x:1001:
-netti:x:1002:
-EOF
-
-for g in cdrom audio video plugdev scanner; do
- for u in joe netti; do
- adduser $u $g
- done
-done