r46511 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r46510‎ | r46511 | r46512 >
Date:01:24, 29 January 2009
Author:tstarling
Status:deferred
Tags:
Comment:
* Added /mnt/upload5 to the remove list, removed /mnt/upload4 from the install list since it's apparently dysfunctional.
* Fixed some more crazy mixed indenting
Modified paths:
  • /trunk/debs/wikimedia-task-appserver/debian/changelog (modified) (history)
  • /trunk/debs/wikimedia-task-appserver/debian/postinst (modified) (history)
  • /trunk/debs/wikimedia-task-appserver/debian/postrm (modified) (history)
  • /trunk/debs/wikimedia-task-appserver/debian/preinst (modified) (history)
  • /trunk/debs/wikimedia-task-appserver/debian/prerm (modified) (history)

Diff [purge]

Index: trunk/debs/wikimedia-task-appserver/debian/postinst
@@ -61,7 +61,6 @@
6262
6363 checkmount amane:/export/upload /mnt/upload3
6464 checkmount amane:/export/math /mnt/math
65 - checkmount storage1.wikimedia.org:/export/upload /mnt/upload4
6665 checkmount ms1.wikimedia.org:/export/upload /mnt/upload5
6766
6867 CLUSTER=$(cat /etc/wikimedia-cluster)
Index: trunk/debs/wikimedia-task-appserver/debian/postrm
@@ -18,42 +18,44 @@
1919 # the debian-policy package
2020
2121 removemount() {
22 - mnt=$1
23 - grep -qs "$mnt.*nfs" /etc/fstab && {
24 - echo "Removing $mnt from fstab"
25 - sed -i "\\,$mnt,d" /etc/fstab
26 - }
 22+ mnt=$1
 23+ grep -qs "$mnt.*nfs" /etc/fstab && {
 24+ echo "Removing $mnt from fstab"
 25+ sed -i "\\,$mnt,d" /etc/fstab
 26+ }
2727
28 - umount $mnt || true
 28+ umount $mnt || true
2929 }
3030
3131 case "$1" in
32 - purge)
33 - # Remove PyBal check user account
34 - deluser pybal-check
 32+ purge)
 33+ # Remove PyBal check user account
 34+ deluser pybal-check
3535 rm -rf /var/lib/pybal-check
3636
37 - dpkg-divert --package wikimedia-task-appserver --rename --remove /etc/apache2/apache2.conf
38 - dpkg-divert --package wikimedia-task-appserver --rename --remove /etc/php5/apache2/php.ini
 37+ dpkg-divert --package wikimedia-task-appserver --rename --remove /etc/apache2/apache2.conf
 38+ dpkg-divert --package wikimedia-task-appserver --rename --remove /etc/php5/apache2/php.ini
3939 dpkg-divert --package wikimedia-task-appserver --rename --remove /usr/share/php5/php.ini-dist
4040 dpkg-divert --package wikimedia-task-appserver --rename --remove /etc/sudoers
41 - dpkg-divert --package wikimedia-task-appserver --rename --remove /etc/apache2/envvars
 41+ dpkg-divert --package wikimedia-task-appserver --rename --remove /etc/apache2/envvars
4242 ;;
43 - remove)
44 - removemount /mnt/upload3
45 - removemount /mnt/upload4
46 - removemount /mnt/math
47 - ;;
 43+ remove)
 44+ removemount /mnt/upload3
 45+ removemount /mnt/upload4
 46+ removemount /mnt/upload5
 47+ removemount /mnt/math
 48+ ;;
4849
49 - upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
50 - removemount /mnt/upload3
51 - removemount /mnt/upload4
52 - removemount /mnt/math
53 - ;;
 50+ upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
 51+ removemount /mnt/upload3
 52+ removemount /mnt/upload4
 53+ removemount /mnt/upload5
 54+ removemount /mnt/math
 55+ ;;
5456
55 - *)
56 - echo "postrm called with unknown argument \`$1'" >&2
57 - exit 1
 57+ *)
 58+ echo "postrm called with unknown argument \`$1'" >&2
 59+ exit 1
5860
5961 esac
6062
Index: trunk/debs/wikimedia-task-appserver/debian/preinst
@@ -16,34 +16,34 @@
1717
1818
1919 case "$1" in
20 - install)
21 - dpkg-divert --package wikimedia-task-appserver --add --rename \
22 - --divert /etc/apache2/apache2.conf.default /etc/apache2/apache2.conf
23 - dpkg-divert --package wikimedia-task-appserver --add --rename \
24 - --divert /etc/php5/apache2/php.ini.default /etc/php5/apache2/php.ini
25 - dpkg-divert --package wikimedia-task-appserver --add --rename \
26 - --divert /usr/share/php5/php.ini-dist.default /usr/share/php5/php.ini-dist
27 - dpkg-divert --package wikimedia-task-appserver --add --rename \
28 - --divert /etc/sudoers.default /etc/sudoers
29 - dpkg-divert --package wikimedia-task-appserver --add --rename \
30 - --divert /etc/apache2/envvars.default /etc/apache2/envvars
 20+ install)
 21+ dpkg-divert --package wikimedia-task-appserver --add --rename \
 22+ --divert /etc/apache2/apache2.conf.default /etc/apache2/apache2.conf
 23+ dpkg-divert --package wikimedia-task-appserver --add --rename \
 24+ --divert /etc/php5/apache2/php.ini.default /etc/php5/apache2/php.ini
 25+ dpkg-divert --package wikimedia-task-appserver --add --rename \
 26+ --divert /usr/share/php5/php.ini-dist.default /usr/share/php5/php.ini-dist
 27+ dpkg-divert --package wikimedia-task-appserver --add --rename \
 28+ --divert /etc/sudoers.default /etc/sudoers
 29+ dpkg-divert --package wikimedia-task-appserver --add --rename \
 30+ --divert /etc/apache2/envvars.default /etc/apache2/envvars
3131
32 - # Create user for the PyBal checks
33 - adduser --system --home /var/lib/pybal-check --group --disabled-password --shell /bin/sh pybal-check
34 - ;;
 32+ # Create user for the PyBal checks
 33+ adduser --system --home /var/lib/pybal-check --group --disabled-password --shell /bin/sh pybal-check
 34+ ;;
3535
36 - upgrade)
37 - # Create user for the PyBal checks
38 - adduser --system --home /var/lib/pybal-check --group --disabled-password --shell /bin/sh pybal-check
39 - ;;
 36+ upgrade)
 37+ # Create user for the PyBal checks
 38+ adduser --system --home /var/lib/pybal-check --group --disabled-password --shell /bin/sh pybal-check
 39+ ;;
4040
41 - abort-upgrade)
42 - ;;
 41+ abort-upgrade)
 42+ ;;
4343
44 - *)
45 - echo "preinst called with unknown argument \`$1'" >&2
46 - exit 1
47 - ;;
 44+ *)
 45+ echo "preinst called with unknown argument \`$1'" >&2
 46+ exit 1
 47+ ;;
4848 esac
4949
5050 # dh_installdeb will replace this with shell code automatically
Index: trunk/debs/wikimedia-task-appserver/debian/prerm
@@ -18,34 +18,37 @@
1919
2020
2121 case "$1" in
22 - remove|deconfigure)
23 - # Add a line to /etc/motd describing the task of this server
24 - if [ -f /etc/motd.tail ]
25 - then
26 - MOTDFILE=/etc/motd.tail
27 - else
28 - MOTDFILE=/etc/motd
29 - fi
 22+ remove|deconfigure)
 23+ # Add a line to /etc/motd describing the task of this server
 24+ if [ -f /etc/motd.tail ]
 25+ then
 26+ MOTDFILE=/etc/motd.tail
 27+ else
 28+ MOTDFILE=/etc/motd
 29+ fi
3030
31 - sed -i '/is a.*(wikimedia-task-appserver).$/d' $MOTDFILE
 31+ sed -i '/is a.*(wikimedia-task-appserver).$/d' $MOTDFILE
3232
33 - if [ -f /etc/motd.tail ]
34 - then
35 - # Update motd
36 - uname -snrvm > /var/run/motd
37 - cat /etc/motd.tail >> /var/run/motd
38 - fi
 33+ if [ -f /etc/motd.tail ]
 34+ then
 35+ # Update motd
 36+ uname -snrvm > /var/run/motd
 37+ cat /etc/motd.tail >> /var/run/motd
 38+ fi
3939
40 - [ -x /etc/init.d/apache2 ] && /etc/init.d/apache2 stop
41 - ;;
42 - upgrade)
43 - ;;
44 - failed-upgrade)
45 - ;;
46 - *)
47 - echo "prerm called with unknown argument \`$1'" >&2
48 - exit 1
49 - ;;
 40+ [ -x /etc/init.d/apache2 ] && /etc/init.d/apache2 stop
 41+ ;;
 42+
 43+ upgrade)
 44+ ;;
 45+
 46+ failed-upgrade)
 47+ ;;
 48+
 49+ *)
 50+ echo "prerm called with unknown argument \`$1'" >&2
 51+ exit 1
 52+ ;;
5053 esac
5154
5255 # dh_installdeb will replace this with shell code automatically
Index: trunk/debs/wikimedia-task-appserver/debian/changelog
@@ -1,3 +1,10 @@
 2+wikimedia-task-appserver (1.33) hardy; urgency=low
 3+
 4+ * Added /mnt/upload5 to the remove list, removed /mnt/upload4 from the
 5+ install list since it's apparently dysfunctional.
 6+
 7+ -- Tim Starling <tstarling@wikimedia.org> Thu, 29 Jan 2009 12:22:40 +1100
 8+
29 wikimedia-task-appserver (1.32) hardy; urgency=low
310
411 * Added /mnt/upload5 to postinst

Status & tagging log