Index: trunk/debs/wikimedia-nis-client/debian/dirs |
— | — | @@ -0,0 +1 @@ |
| 2 | +usr/sbin |
Index: trunk/debs/wikimedia-nis-client/debian/files |
— | — | @@ -0,0 +1 @@ |
| 2 | +wikimedia-nis-client_1.0_all.deb unknown optional |
Index: trunk/debs/wikimedia-nis-client/debian/compat |
— | — | @@ -0,0 +1 @@ |
| 2 | +4 |
Index: trunk/debs/wikimedia-nis-client/debian/postinst |
— | — | @@ -0,0 +1,86 @@ |
| 2 | +#! /bin/sh |
| 3 | +# postinst script for wikimedia-task-dns-auth |
| 4 | +# |
| 5 | +# see: dh_installdeb(1) |
| 6 | + |
| 7 | +set -e |
| 8 | + |
| 9 | +# summary of how this script can be called: |
| 10 | +# * <postinst> `configure' <most-recently-configured-version> |
| 11 | +# * <old-postinst> `abort-upgrade' <new version> |
| 12 | +# * <conflictor's-postinst> `abort-remove' `in-favour' <package> |
| 13 | +# <new-version> |
| 14 | +# * <deconfigured's-postinst> `abort-deconfigure' `in-favour' |
| 15 | +# <failed-install-package> <version> `removing' |
| 16 | +# <conflicting-package> <version> |
| 17 | +# for details, see http://www.debian.org/doc/debian-policy/ or |
| 18 | +# the debian-policy package |
| 19 | +# |
| 20 | + |
| 21 | +case "$1" in |
| 22 | + configure) |
| 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 |
| 30 | + |
| 31 | + if ! grep -qs "wikimedia-nis-client" $MOTDFILE |
| 32 | + then |
| 33 | + echo "$(hostname) is a Wikimedia NIS client (wikimedia-nis-client)." >> $MOTDFILE |
| 34 | + |
| 35 | + if [ -f /etc/motd.tail ] |
| 36 | + then |
| 37 | + # Update motd |
| 38 | + uname -snrvm > /var/run/motd |
| 39 | + cat /etc/motd.tail >> /var/run/motd |
| 40 | + fi |
| 41 | + fi |
| 42 | + |
| 43 | + # Update the system to use NIS for users. |
| 44 | + nss-edit passwd "files nis" |
| 45 | + nss-edit group "files nis" |
| 46 | + nss-edit shadow "files nis" |
| 47 | + |
| 48 | + . /usr/share/debconf/confmodule |
| 49 | + db_version 2.0 || true |
| 50 | + db_set nis/domain pmtpa.wmnet || true |
| 51 | + db_go || true |
| 52 | + |
| 53 | + sed -i 's/^NISCLIENT=.*$/NISCLIENT=true/' /etc/default/nis |
| 54 | + printf 'ypserver srv1.pmtpa.wmnet\nypserver srv2.pmtpa.wmnet\n' > /etc/yp.conf |
| 55 | + |
| 56 | + # Make sure nscd doesn't cache hosts |
| 57 | + sed -i '/enable-cache.*hosts/ { s/yes/no/ }' /etc/nscd.conf |
| 58 | + /etc/init.d/nscd reload |
| 59 | + /etc/init.d/nis restart |
| 60 | + |
| 61 | + # Add the /home mount |
| 62 | + grep -qs '^/home' /etc/fstab || { |
| 63 | + echo "Adding /home mount..." >&2 |
| 64 | + echo >>/etc/fstab \ |
| 65 | + '10.0.5.8:/home /home nfs bg,soft,udp,rsize=8192,wsize=8192,timeo=14,intr,nfsvers=3 0 0' |
| 66 | + mount /home |
| 67 | + } |
| 68 | + ;; |
| 69 | + |
| 70 | + abort-upgrade|abort-remove|abort-deconfigure) |
| 71 | + |
| 72 | + ;; |
| 73 | + |
| 74 | + *) |
| 75 | + echo "postinst called with unknown argument \`$1'" >&2 |
| 76 | + exit 1 |
| 77 | + ;; |
| 78 | +esac |
| 79 | + |
| 80 | +# dh_installdeb will replace this with shell code automatically |
| 81 | +# generated by other debhelper scripts. |
| 82 | + |
| 83 | +#DEBHELPER# |
| 84 | + |
| 85 | +exit 0 |
| 86 | + |
| 87 | + |
Index: trunk/debs/wikimedia-nis-client/debian/postrm |
— | — | @@ -0,0 +1,44 @@ |
| 2 | +#! /bin/sh |
| 3 | +# postrm script for wikimedia-base |
| 4 | +# |
| 5 | +# see: dh_installdeb(1) |
| 6 | + |
| 7 | +set -e |
| 8 | + |
| 9 | +# summary of how this script can be called: |
| 10 | +# * <postrm> `remove' |
| 11 | +# * <postrm> `purge' |
| 12 | +# * <old-postrm> `upgrade' <new-version> |
| 13 | +# * <new-postrm> `failed-upgrade' <old-version> |
| 14 | +# * <new-postrm> `abort-install' |
| 15 | +# * <new-postrm> `abort-install' <old-version> |
| 16 | +# * <new-postrm> `abort-upgrade' <old-version> |
| 17 | +# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version> |
| 18 | +# for details, see http://www.debian.org/doc/debian-policy/ or |
| 19 | +# the debian-policy package |
| 20 | + |
| 21 | + |
| 22 | +case "$1" in |
| 23 | + purge) |
| 24 | + [ -f /etc/yp.conf ] && { |
| 25 | + rm -f /etc/yp.conf |
| 26 | + touch /etc/yp.conf |
| 27 | + } |
| 28 | + ;; |
| 29 | + remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) |
| 30 | + |
| 31 | + |
| 32 | + ;; |
| 33 | + |
| 34 | + *) |
| 35 | + echo "postrm called with unknown argument \`$1'" >&2 |
| 36 | + exit 1 |
| 37 | + |
| 38 | +esac |
| 39 | + |
| 40 | +# dh_installdeb will replace this with shell code automatically |
| 41 | +# generated by other debhelper scripts. |
| 42 | + |
| 43 | +#DEBHELPER# |
| 44 | + |
| 45 | +exit 0 |
Index: trunk/debs/wikimedia-nis-client/debian/preinst |
— | — | @@ -0,0 +1,38 @@ |
| 2 | +#! /bin/sh |
| 3 | +# preinst script for wikimedia-base |
| 4 | +# |
| 5 | +# see: dh_installdeb(1) |
| 6 | + |
| 7 | +set -e |
| 8 | + |
| 9 | +# summary of how this script can be called: |
| 10 | +# * <new-preinst> `install' |
| 11 | +# * <new-preinst> `install' <old-version> |
| 12 | +# * <new-preinst> `upgrade' <old-version> |
| 13 | +# * <old-preinst> `abort-upgrade' <new-version> |
| 14 | +# |
| 15 | +# for details, see http://www.debian.org/doc/debian-policy/ or |
| 16 | +# the debian-policy package |
| 17 | + |
| 18 | + |
| 19 | +case "$1" in |
| 20 | + install|upgrade) |
| 21 | + ;; |
| 22 | + |
| 23 | + abort-upgrade) |
| 24 | + ;; |
| 25 | + |
| 26 | + *) |
| 27 | + echo "preinst called with unknown argument \`$1'" >&2 |
| 28 | + exit 1 |
| 29 | + ;; |
| 30 | +esac |
| 31 | + |
| 32 | +# dh_installdeb will replace this with shell code automatically |
| 33 | +# generated by other debhelper scripts. |
| 34 | + |
| 35 | +#DEBHELPER# |
| 36 | + |
| 37 | +exit 0 |
| 38 | + |
| 39 | + |
Index: trunk/debs/wikimedia-nis-client/debian/prerm |
— | — | @@ -0,0 +1,67 @@ |
| 2 | +#! /bin/sh |
| 3 | +# prerm script for wikimedia-task-dns-auth |
| 4 | +# |
| 5 | +# see: dh_installdeb(1) |
| 6 | + |
| 7 | +set -e |
| 8 | + |
| 9 | +# summary of how this script can be called: |
| 10 | +# * <prerm> `remove' |
| 11 | +# * <old-prerm> `upgrade' <new-version> |
| 12 | +# * <new-prerm> `failed-upgrade' <old-version> |
| 13 | +# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version> |
| 14 | +# * <deconfigured's-prerm> `deconfigure' `in-favour' |
| 15 | +# <package-being-installed> <version> `removing' |
| 16 | +# <conflicting-package> <version> |
| 17 | +# for details, see http://www.debian.org/doc/debian-policy/ or |
| 18 | +# the debian-policy package |
| 19 | + |
| 20 | + |
| 21 | +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 |
| 30 | + |
| 31 | + sed -i '/is a.*(wikimedia-nis-client).$/d' $MOTDFILE |
| 32 | + |
| 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 |
| 39 | + |
| 40 | + nss-edit passwd files |
| 41 | + nss-edit shadow files |
| 42 | + nss-edit group files |
| 43 | + |
| 44 | + sed -i 's/^NISCLIENT=.*$/NISCLIENT=false/' /etc/default/nis |
| 45 | + [ -x /etc/init.d/nis ] && /etc/init.d/nis stop |
| 46 | + |
| 47 | + echo "Unmounting /home..." >&2 |
| 48 | + umount /home || true |
| 49 | + sed -i '/:\/home.*nfs/d' /etc/fstab |
| 50 | + ;; |
| 51 | + upgrade) |
| 52 | + ;; |
| 53 | + failed-upgrade) |
| 54 | + ;; |
| 55 | + *) |
| 56 | + echo "prerm called with unknown argument \`$1'" >&2 |
| 57 | + exit 1 |
| 58 | + ;; |
| 59 | +esac |
| 60 | + |
| 61 | +# dh_installdeb will replace this with shell code automatically |
| 62 | +# generated by other debhelper scripts. |
| 63 | + |
| 64 | +#DEBHELPER# |
| 65 | + |
| 66 | +exit 0 |
| 67 | + |
| 68 | + |
Index: trunk/debs/wikimedia-nis-client/debian/changelog |
— | — | @@ -0,0 +1,5 @@ |
| 2 | +wikimedia-nis-client (1.0) feisty; urgency=low |
| 3 | + |
| 4 | + * Initial release |
| 5 | + |
| 6 | + -- River Tarnell <river@wikimedia.org> Sat, 12 May 2007 14:02:00 +0000 |
Index: trunk/debs/wikimedia-nis-client/debian/conffiles |
Index: trunk/debs/wikimedia-nis-client/debian/copyright |
— | — | @@ -0,0 +1 @@ |
| 2 | +Copyright (c) 2007 River Tarnell <river@wikimedia.org>. Public domain. |
Index: trunk/debs/wikimedia-nis-client/debian/rules |
— | — | @@ -0,0 +1,94 @@ |
| 2 | +#!/usr/bin/make -f |
| 3 | +# -*- makefile -*- |
| 4 | +# Sample debian/rules that uses debhelper. |
| 5 | +# This file was originally written by Joey Hess and Craig Small. |
| 6 | +# As a special exception, when this file is copied by dh-make into a |
| 7 | +# dh-make output file, you may use that output file without restriction. |
| 8 | +# This special exception was added by Craig Small in version 0.37 of dh-make. |
| 9 | + |
| 10 | +# Uncomment this to turn on verbose mode. |
| 11 | +#export DH_VERBOSE=1 |
| 12 | + |
| 13 | +DESTDIR=$(CURDIR)/debian/wikimedia-nis-client |
| 14 | + |
| 15 | +CFLAGS = -Wall -g |
| 16 | + |
| 17 | +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) |
| 18 | + CFLAGS += -O0 |
| 19 | +else |
| 20 | + CFLAGS += -O2 |
| 21 | +endif |
| 22 | + |
| 23 | +configure: configure-stamp |
| 24 | +configure-stamp: |
| 25 | + dh_testdir |
| 26 | + # Add here commands to configure the package. |
| 27 | + |
| 28 | + touch configure-stamp |
| 29 | + |
| 30 | + |
| 31 | +build: build-stamp |
| 32 | + |
| 33 | +build-stamp: configure-stamp |
| 34 | + dh_testdir |
| 35 | + |
| 36 | + # Add here commands to compile the package. |
| 37 | + #$(MAKE) |
| 38 | + |
| 39 | + touch build-stamp |
| 40 | + |
| 41 | +clean: |
| 42 | + dh_testdir |
| 43 | + dh_testroot |
| 44 | + rm -f build-stamp configure-stamp |
| 45 | + |
| 46 | + # Add here commands to clean up after the build process. |
| 47 | + #-$(MAKE) clean |
| 48 | + |
| 49 | + dh_clean |
| 50 | + |
| 51 | +install: build |
| 52 | + dh_testdir |
| 53 | + dh_testroot |
| 54 | + dh_clean -k |
| 55 | + dh_installdirs |
| 56 | + |
| 57 | + install -o root -g bin -m 0755 nss-edit $(DESTDIR)/usr/sbin/ |
| 58 | + |
| 59 | +# Build architecture-independent files here. |
| 60 | +binary-indep: build install |
| 61 | +# We have nothing to do by default. |
| 62 | + |
| 63 | +# Build architecture-dependent files here. |
| 64 | +binary-arch: build install |
| 65 | + dh_testdir |
| 66 | + dh_testroot |
| 67 | + dh_installchangelogs |
| 68 | + dh_installdocs |
| 69 | + dh_installexamples |
| 70 | +# dh_install |
| 71 | +# dh_installmenu |
| 72 | +# dh_installdebconf |
| 73 | +# dh_installlogrotate |
| 74 | +# dh_installemacsen |
| 75 | +# dh_installpam |
| 76 | +# dh_installmime |
| 77 | +# dh_installinit |
| 78 | + dh_installcron |
| 79 | +# dh_installinfo |
| 80 | + dh_installman |
| 81 | + dh_link |
| 82 | + dh_strip |
| 83 | + dh_compress |
| 84 | + dh_fixperms |
| 85 | +# dh_perl |
| 86 | +# dh_python |
| 87 | +# dh_makeshlibs |
| 88 | + dh_installdeb |
| 89 | + dh_shlibdeps |
| 90 | + dh_gencontrol |
| 91 | + dh_md5sums |
| 92 | + dh_builddeb |
| 93 | + |
| 94 | +binary: binary-indep binary-arch |
| 95 | +.PHONY: build clean binary-indep binary-arch binary install configure |
Property changes on: trunk/debs/wikimedia-nis-client/debian/rules |
___________________________________________________________________ |
Added: svn:executable |
1 | 96 | + * |
Index: trunk/debs/wikimedia-nis-client/debian/README.Debian |
— | — | @@ -0,0 +1,5 @@ |
| 2 | +wikimedia-nis-client |
| 3 | +----------------------- |
| 4 | + |
| 5 | +This package configures a machine to use NIS for name services, |
| 6 | +and mount /home. |
Index: trunk/debs/wikimedia-nis-client/nss-edit |
— | — | @@ -0,0 +1,19 @@ |
| 2 | +#! /bin/sh |
| 3 | +# Edit /etc/nsswitch.conf |
| 4 | + |
| 5 | +set -e |
| 6 | + |
| 7 | +[ $# = 2 ] || { |
| 8 | + echo >&2 "usage: $0 <database> <repositories>" |
| 9 | + exit 1 |
| 10 | +} |
| 11 | + |
| 12 | +db=$1 |
| 13 | +repos=$2 |
| 14 | + |
| 15 | +echo "updating database $1 to \"$repos\"..." |
| 16 | + |
| 17 | +cp -p /etc/nsswitch.conf /etc/nsswitch.conf.bak |
| 18 | +sed < /etc/nsswitch.conf > /etc/nsswitch.conf.tmp \ |
| 19 | + "s/^$db: .*/$db: $repos/" |
| 20 | +mv /etc/nsswitch.conf.tmp /etc/nsswitch.conf |
Property changes on: trunk/debs/wikimedia-nis-client/nss-edit |
___________________________________________________________________ |
Added: svn:executable |
1 | 21 | + * |