From f4c52385f1c3cdfbebdf9f6037f6ff38ab6064d1 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 17 Apr 2008 20:18:56 +0200 Subject: [PATCH] postinst-setup: fix remaining idempotency bugs --- postinst-setup | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/postinst-setup b/postinst-setup index eebf6b9..4c69172 100755 --- a/postinst-setup +++ b/postinst-setup @@ -12,7 +12,7 @@ if [ -r "$UBUNTU_CD" ]; then mount -o loop "$UBUNTU_CD" /cdrom apt-cdrom -m add fi -DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential fakeroot devscripts postfix openssh-server bzr +DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential fakeroot devscripts postfix openssh-server bzr python-paramiko # root's ssh stuff if [ ! -d /root/.ssh ] && [ -d /home/martin/.ssh ]; then @@ -33,21 +33,21 @@ if [ ! -d /etc/.bzr ]; then cp -av /backup-etc/.bzr/ /etc/ rm -rf /backup-etc chmod 600 /etc/ssh/ssh_*_key -fi -# only restore dchroot part into fstab -grep -A 200 "^# dchroots" fstab >> fstab.originst || true -mv fstab.originst fstab + # only restore dchroot part into fstab + grep -A 200 "^# dchroots" 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 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 + # only restore some passwords from shadow + egrep 'martin|netti|joe' shadow >> shadow.originst + mv shadow.originst shadow +fi # update postfix for new configuration newaliases @@ -67,13 +67,13 @@ locale-gen ru_RU ru_RU.UTF-8 killall apt-get || true # cronjob goo apt-get purge -y --auto-remove hplip brltty bluez-cups gnome-accessibility-themes gnome-mag gnome-orca onboard tomboy ttf-arabeyes ttf-arphic-uming ttf-baekmuk ttf-gentium ttf-kochi-gothic ttf-kochi-mincho ttf-lao ttf-malayalam-fonts ttf-mgopen ttf-thai-tlwg || true -rm /etc/rcS.d/*pcmcia* /etc/rcS.d/*ppp* +rm -f /etc/rcS.d/*pcmcia* /etc/rcS.d/*ppp* # install packages from network sources killall apt-get || true apt-get update -o Acquire::Http::No-Cache=true -DEBIAN_FRONTEND=noninteractive apt-get install -y --force-yes vim bzrtools bzr-svn python-paramiko patchutils offlineimap wipe diffstat gtimelog 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 grep-dctrl ccache subversion listadmin quilt python-dev cryptsetup mutt editmoin lintian python-gtk2-doc fakechroot ubuntu-dev-tools dput gnome-blog +DEBIAN_FRONTEND=noninteractive apt-get install -y --force-yes vim bzrtools bzr-svn patchutils offlineimap wipe diffstat gtimelog 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 grep-dctrl ccache subversion listadmin quilt python-dev cryptsetup mutt editmoin lintian python-gtk2-doc fakechroot ubuntu-dev-tools dput gnome-blog apt-get -y build-dep postgresql-8.3 gnome-volume-manager hal cupsys apport jockey if [ `hostname` = donald ]; then -- 2.39.5