X-Git-Url: https://piware.de/gitweb/?a=blobdiff_plain;f=postinst-setup;h=5391e89a50436673d1bc4473eddb7967aee64dcc;hb=8b66e2bc6bef3cea3bdc90d4a7a21150aa0f09e6;hp=a2afae01a8842ad24ceade844e398ca6fb74f6f8;hpb=69789764b97df9fdb76f6f29c491c1ac2083e552;p=bin.git diff --git a/postinst-setup b/postinst-setup index a2afae0..5391e89 100755 --- a/postinst-setup +++ b/postinst-setup @@ -7,7 +7,7 @@ if [ -d /home/martin/backup ] && [ ! -d /var/backups/martin ]; then fi # need bzr and postfix for the setup below -DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends postfix openssh-server bzr python-paramiko +DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends postfix openssh-server bzr python-paramiko apt-cacher-ng # root's ssh stuff if [ ! -d /root/.ssh ] && [ -d /home/martin/.ssh ]; then @@ -20,65 +20,59 @@ fi # completely cd /etc if [ ! -d /etc/.bzr ]; then - for i in passwd group shadow fstab; do - [ -e $i.originst ] || cp $i $i.originst - done - [ -e /backup-etc ] || bzr get bzr+ssh://martin@piware.de/home/martin/backup/`hostname`-etc /backup-etc + [ -e /backup-etc ] || bzr branch bzr+ssh://martin@piware.de/home/martin/backup/`hostname`-etc /backup-etc cp -av /backup-etc/* /etc/ cp -av /backup-etc/.bzr/ /etc/ rm -rf /backup-etc chmod 600 /etc/ssh/ssh_*_key - chmod 640 /etc/shadow - chown root:shadow /etc/shadow chmod 700 /etc/ssl/private chmod 640 /etc/ssl/private/ssl-cert-* chown root:ssl-cert /etc/ssl/private/ssl-cert* - - # only restore dchroot part into fstab - grep -A 200 "^#.*chroot" fstab >> fstab.originst || true - mv fstab.originst fstab - - # only restore the human users from passwd/group - for i in passwd group; do - perl -naF: -e 'print if $F[2] > 1000 && $F[2] < 60000' $i >> $i.originst - mv $i.originst $i - done - - # only restore some passwords from shadow - egrep 'martin|netti|joe' shadow >> shadow.originst - mv shadow.originst shadow - chown root:shadow shadow - chmod 640 shadow + echo "none /tmp tmpfs defaults 0 0" >> /etc/fstab fi +# set up apt-cacher-ng +/etc/init.d/apt-cacher-ng stop +mkdir -p /scratch/apt-cacher-ng +sed -i '/^CacheDir:/ s!^.*!CacheDir: /scratch/apt-cacher-ng!' /etc/apt-cacher-ng/zz_debconf.conf +chown -R apt-cacher-ng:apt-cacher-ng /scratch/apt-cacher-ng +/etc/init.d/apt-cacher-ng start + # update postfix for new configuration newaliases /etc/init.d/postfix restart -# other setup -dpkg -i /home/martin/download/libdvdcss2_*deb || true -locale-gen ru_RU ru_RU.UTF-8 - # remove packages that we do not need killall apt-get || true # cronjob goo -apt-get purge -y --auto-remove hplip hplip-data hpijs brltty bluez-cups gnome-accessibility-themes gnome-mag gnome-orca onboard tomboy ttf-lao ttf-thai-tlwg || true - -rm -f /etc/rcS.d/*pcmcia* /etc/rcS.d/*ppp* +apt-get purge -y --auto-remove hplip hplip-data printer-driver-hpcups brltty bluez-cups gnome-accessibility-themes gnome-orca onboard thunderbird deja-dup|| true # install packages from network sources killall apt-get || true apt-get update -DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y --force-yes vim bzrtools patchutils offlineimap wipe diffstat gtimelog libtool devhelp python-doc manpages-dev gstreamer0.10-fluendo-mp3 gstreamer0.10-ffmpeg weechat weechat-plugins weechat-scripts dpatch wdiff ccache listadmin quilt cryptsetup mutt editmoin lintian fakechroot ubuntu-dev-tools dput dchroot easytag rsnapshot texlive-lang-german texlive-latex-extra powertop qemu-kvm bzr-buildpackage git-core build-essential fakeroot devscripts libglib2.0-doc libgtk-3-doc git-buildpackage d-feet germinate debootstrap seahorse-plugins wmctrl mumble qemu-kvm flashplugin-installer +DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y --force-yes vim patchutils offlineimap diffstat gtimelog devhelp python3-doc manpages-dev weechat weechat-plugins weechat-scripts listadmin quilt mutt editmoin lintian ubuntu-dev-tools dput easytag rsnapshot texlive-lang-german texlive-latex-extra powertop qemu-kvm qemu-utils bzr-buildpackage git build-essential fakeroot devscripts libglib2.0-doc libgtk-3-doc git-buildpackage d-feet wmctrl libnotify-bin svn-buildpackage pastebinit lptools openvpn pdfjam sbuild schroot exiv2 phablet-tools gstreamer1.0-plugins-ugly flashplugin-installer valgrind calibre autopkgtest +apt-get install lxc -apt-get -y build-dep postgresql-8.4 cups apport calibre gvfs udisks upower gnome-disk-utility udev python-gobject +# ccache + +apt-get -y --no-install-recommends build-dep udisks2 upower systemd umockdev + +# have schroot use tmpfs +rmdir /var/lib/schroot/unpack /var/lib/schroot/union/overlay/ +ln -s /tmp /var/lib/schroot/unpack +ln -s /tmp /var/lib/schroot/union/overlay + +# set up users +echo "Setting up users" +adduser martin sbuild +if ! getent passwd joe > /dev/null; then + adduser --gecos "Joe" joe + adduser joe audio + adduser joe video +fi # crontabs crontab -u martin - </dev/null EOF - -if [ -x /usr/bin/gtimelog ]; then - patch --no-backup-if-mismatch /usr/share/pyshared/gtimelog/main.py ~martin/archiv/gtimelog.tuesday.patch -fi