r46508 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r46507‎ | r46508 | r46509 >
Date:01:08, 29 January 2009
Author:tstarling
Status:deferred
Tags:
Comment:
* Added /mnt/upload5 to postinst
* In postinst, use tabs for indenting, not an arbitrary mixture of tabs and spaces
Modified paths:
  • /trunk/debs/wikimedia-task-appserver/debian/changelog (modified) (history)
  • /trunk/debs/wikimedia-task-appserver/debian/postinst (modified) (history)

Diff [purge]

Index: trunk/debs/wikimedia-task-appserver/debian/postinst
@@ -2,6 +2,7 @@
33 # postinst script for wikimedia-task-dns-auth
44 #
55 # see: dh_installdeb(1)
 6+# vim: set sw=4 ts=4 noet :
67
78 set -e
89
@@ -18,24 +19,24 @@
1920 #
2021
2122 checkmount() {
22 - dev=$1
23 - mnt=$2
 23+ dev=$1
 24+ mnt=$2
2425
25 - [ -d $mnt ] || {
26 - mkdir -p $mnt
27 - echo "created $mnt" >&2
28 - }
 26+ [ -d $mnt ] || {
 27+ mkdir -p $mnt
 28+ echo "created $mnt" >&2
 29+ }
2930
30 - grep -qs "^$dev" /etc/fstab || {
31 - echo "Adding $mnt mount..." >&2
32 - echo >>/etc/fstab \
33 - "$dev $mnt nfs bg,soft,udp,rsize=8192,wsize=8192,timeo=14,intr,nfsvers=3 0 0"
34 - mount $mnt || true
35 - }
 31+ grep -qs "^$dev" /etc/fstab || {
 32+ echo "Adding $mnt mount..." >&2
 33+ echo >>/etc/fstab \
 34+ "$dev $mnt nfs bg,soft,udp,rsize=8192,wsize=8192,timeo=14,intr,nfsvers=3 0 0"
 35+ mount $mnt || true
 36+ }
3637 }
3738
3839 case "$1" in
39 - configure)
 40+ configure)
4041 # Add a line to /etc/motd describing the task of this server
4142 if [ -f /etc/motd.tail ]
4243 then
@@ -50,17 +51,18 @@
5152
5253 if [ -f /etc/motd.tail ]
5354 then
54 - # Update motd
 55+ # Update motd
5556 uname -snrvm > /var/run/motd
56 - cat /etc/motd.tail >> /var/run/motd
 57+ cat /etc/motd.tail >> /var/run/motd
5758 fi
5859 fi
5960
60 - chown -R pybal-check:pybal-check /var/lib/pybal-check/.ssh
 61+ chown -R pybal-check:pybal-check /var/lib/pybal-check/.ssh
6162
62 - checkmount amane:/export/upload /mnt/upload3
63 - checkmount amane:/export/math /mnt/math
64 - checkmount storage1.wikimedia.org:/export/upload /mnt/upload4
 63+ checkmount amane:/export/upload /mnt/upload3
 64+ checkmount amane:/export/math /mnt/math
 65+ checkmount storage1.wikimedia.org:/export/upload /mnt/upload4
 66+ checkmount ms1.wikimedia.org:/export/upload /mnt/upload5
6567
6668 CLUSTER=$(cat /etc/wikimedia-cluster)
6769 if [ $CLUSTER="pmtpa" ]
@@ -73,16 +75,16 @@
7476 else
7577 echo "remember to sync this server before you start it!"
7678 fi
77 - ;;
 79+ ;;
7880
79 - abort-upgrade|abort-remove|abort-deconfigure)
 81+ abort-upgrade|abort-remove|abort-deconfigure)
8082
81 - ;;
 83+ ;;
8284
83 - *)
84 - echo "postinst called with unknown argument \`$1'" >&2
85 - exit 1
86 - ;;
 85+ *)
 86+ echo "postinst called with unknown argument \`$1'" >&2
 87+ exit 1
 88+ ;;
8789 esac
8890
8991 # dh_installdeb will replace this with shell code automatically
Index: trunk/debs/wikimedia-task-appserver/debian/changelog
@@ -1,3 +1,9 @@
 2+wikimedia-task-appserver (1.32) hardy; urgency=low
 3+
 4+ * Added /mnt/upload5 to postinst
 5+
 6+ -- Tim Starling <tstarling@wikimedia.org> Thu, 29 Jan 2009 12:02:42 +1100
 7+
28 wikimedia-task-appserver (1.31) hardy; urgency=low
39
410 * Bumped post and upload limits to 100M, we're trying it out...

Status & tagging log