]> piware.de Git - bin.git/blobdiff - postinst-setup
postinst-setup: keep network-manager for dogfooding
[bin.git] / postinst-setup
index d55fb4b7ad9f6f241e1debef1877a4fc4b25a3d4..ddcacf9e0365ac6379c2282e906c0c87aa909095 100755 (executable)
@@ -1,5 +1,11 @@
 #!/bin/sh -e
 
+# move backup to /var
+if [ -d /home/martin/backup ] && [ ! -d /var/backups/martin ]; then
+    cp -a /home/martin/backup /var/backups/martin
+    rm -rf /home/martin/backup
+fi
+
 # install already shipped debs
 [ -e /mirror ] || ln -s /home/ubuntu-mirror /mirror
 mount -o loop /home/martin/download/ubuntu/gutsy-alternate-amd64.iso /cdrom
@@ -17,11 +23,14 @@ fi
 # completely
 cd /etc
 if [ ! -d /etc/.bzr ]; then
-    rsync -r martin@piware.de:backup/desktop-etc/.bzr .
     for i in passwd group shadow fstab; do
         cp $i $i.originst
     done
-    bzr revert --no-backup
+    bzr get bzr+ssh://martin@piware.de/home/martin/backup/desktop-etc /desktop-etc
+    cp -av /desktop-etc/* /etc/
+    cp -av /desktop-etc/.bzr/ /etc/
+    rm -rf /desktop-etc
+    chmod 600 /etc/ssh/ssh_*_key
 fi
 
 # only restore dchroot part into fstab
@@ -30,7 +39,7 @@ 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
+    perl -naF: -e 'print if $F[2] > 1000 && $F[2] < 60000' $i >> $i.originst
     mv $i.originst $i
 done
 
@@ -45,6 +54,7 @@ newaliases
 # copy apt cache
 if [ -d /home/aptcache ]; then
     find /home/aptcache/ -name "*.deb" -exec cp '{}' /var/cache/apt/archives/ \;
+    rm -rf /home/aptcache
 fi
 
 # other setup
@@ -55,31 +65,30 @@ locale-gen ru_RU ru_RU.UTF-8
 killall apt-get || true
 
 # remove packages that we do not need
-apt-get remove --purge -y --auto-remove network-manager hplip brltty bluez-cups gnome-accessibility-themes gnome-mag gnome-orca onboard tomboy ttf-arabeyes ttf-arphic-ukai ttf-arphic-uming ttf-baekmuk ttf-gentium ttf-indic-fonts ttf-kochi-gothic ttf-kochi-mincho ttf-lao ttf-malayalam-fonts ttf-mgopen ttf-thai-tlwg
+apt-get remove --purge -y --auto-remove hplip brltty bluez-cups gnome-accessibility-themes gnome-mag gnome-orca onboard tomboy ttf-arabeyes ttf-arphic-ukai ttf-arphic-uming ttf-baekmuk ttf-gentium ttf-indic-fonts ttf-kochi-gothic ttf-kochi-mincho ttf-lao ttf-malayalam-fonts ttf-mgopen ttf-thai-tlwg
 
 rm /etc/rcS.d/*pcmcia* /etc/rcS.d/*ppp*
 
-# restore our network
-ifdown eth0 || true
-ifup eth0
-
 # cronjob goo
 killall apt-get || true
 
 # install packages from network sources
 apt-get update -o Acquire::Http::No-Cache=true
 
-DEBIAN_FRONTEND=noninteractive apt-get install -y --force-yes vim bzrtools python-paramiko patchutils offlineimap wipe gnome-gpg diffstat dchroot gtimelog rsnapshot jigdo-file libtool devhelp python-doc manpages-dev gstreamer0.10-plugins-ugly gstreamer0.10-plugins-bad gstreamer0.10-plugins-bad-multiverse gstreamer0.10-plugins-ugly-multiverse gstreamer0.10-ffmpeg xchat debmirror dpatch wdiff dhcp3-server grep-dctrl ccache subversion listadmin quilt apache2 python-dev cryptsetup mutt editmoin lintian
-apt-get -y build-dep postgresql-8.2 gnome-volume-manager hal cupsys apport
+DEBIAN_FRONTEND=noninteractive apt-get install -y --force-yes vim bzrtools bzr-svn python-paramiko patchutils offlineimap wipe gnome-gpg diffstat dchroot gtimelog rsnapshot jigdo-file libtool devhelp python-doc manpages-dev gstreamer0.10-plugins-ugly gstreamer0.10-plugins-bad gstreamer0.10-plugins-bad-multiverse gstreamer0.10-plugins-ugly-multiverse gstreamer0.10-ffmpeg weechat weechat-plugins weechat-scripts dpatch wdiff dhcp3-server grep-dctrl ccache subversion listadmin quilt apache2 python-dev cryptsetup mutt editmoin lintian ia32-libs easytag latex-beamer python-gtk2-doc
+apt-get -y build-dep postgresql-8.2 gnome-volume-manager hal cupsys apport restricted-manager
+
+umount /cdrom
 
 # other setup
 ln -s /mirror /var/www/mirror
 ifdown eth1
 ifup eth1
 /etc/init.d/dhcp3-server restart
+patch /usr/bin/gtimelog ~martin/archiv/gtimelog.wednesday.patch
 
 # crontabs
 crontab -u martin - <<EOF
 # m h  dom mon dow   command
-05 * * * * \$HOME/bin/backup
+05 * * * * \$HOME/bin/backup >/dev/null
 EOF