summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2002-03-07 16:22:51 +0000
committerJonas Smedegaard <dr@jones.dk>2002-03-07 16:22:51 +0000
commit85d7610aadf1be8e4d1bece0a5ad5d63ccd3089c (patch)
tree2c2c72a2123c0e234e21b65196cf17a702ceb501
parent0490e886f63d90013c3e10fe456fb84d6dd48fab (diff)
Rename files and add/improve descriptive headers.
-rwxr-xr-xadduser.local7
-rwxr-xr-xaptdpkgclean46
-rwxr-xr-xaptdpkgclean.sh20
-rwxr-xr-xaptdpkgro43
-rwxr-xr-xaptdpkgro.sh17
-rwxr-xr-xdeluser.local8
-rwxr-xr-xfaxrcvd7
-rwxr-xr-xfaxrcvd-mail7
-rwxr-xr-xinit-mailmanarchive8
-rwxr-xr-xlocaldumpsql12
-rwxr-xr-xlocalezcreate10
-rwxr-xr-xlocalmkmailcerts (renamed from mkmailcerts)9
-rwxr-xr-xlocalmkpostfixvirtual22
-rwxr-xr-xlocalmoffycreate8
-rwxr-xr-xlocalrundig10
-rwxr-xr-xlocalwebbbscreate8
-rwxr-xr-xlocalwebcalcreate8
-rwxr-xr-xlocalwebsearch10
-rwxr-xr-xlocalwebstats10
-rwxr-xr-xshowlog10
20 files changed, 216 insertions, 64 deletions
diff --git a/adduser.local b/adduser.local
index 4570a6c..507a9a6 100755
--- a/adduser.local
+++ b/adduser.local
@@ -1,12 +1,13 @@
#!/bin/sh
-
#
-# adduser.local
+# /usr/local/sbin/adduser.local
+# Copyright 2001-2002 Jonas Smedegaard <dr@jones.dk>
#
-# $Id: adduser.local,v 1.5 2002-03-07 15:28:01 jonas Exp $
+# $Id: adduser.local,v 1.6 2002-03-07 16:22:51 jonas Exp $
#
# Common adduser additions for Spiff and Xenux networks
#
+
set -e
NEWUSERNAME=$1
diff --git a/aptdpkgclean b/aptdpkgclean
new file mode 100755
index 0000000..e42631c
--- /dev/null
+++ b/aptdpkgclean
@@ -0,0 +1,46 @@
+#!/bin/sh
+#
+# /usr/local/sbin/aptdpkgclean
+# Put together and tweaked by Jonas Smedegaard <dr@jones.dk>
+# 2001-2002
+#
+# $Id: aptdpkgclean,v 1.1 2002-03-07 16:22:51 jonas Exp $
+#
+# Auto re-mounting of a readonly /usr
+# Put the following in a file below /etc/apt/apt.conf.d:
+#
+# // Auto re-mounting of a readonly /usr
+# // Based on mail from Anthony Towns <aj@azure.humbug.org.au>
+# // http://lists.debian.org/debian-devel/2001/debian-devel-200111/msg00212.html
+#
+# // This is the intended thing:
+# // DPkg {
+# // Pre-Invoke {"mount -o remount,rw /usr";};
+# // Post-Invoke {"mount -o remount,ro /usr";};
+# // };
+#
+# DPkg {
+# Pre-Install-Pkgs {"/usr/local/sbin/aptdpkgro";};
+# Pre-Invoke {"mount -o remount,rw /usr";};
+# Post-Invoke {"/usr/local/sbin/aptdpkgclean; mount -o remount,ro /usr";};
+# };
+#
+
+pathmatch="^/usr"
+
+cat /var/lib/my_ro_hack.todel | while read file; do
+ [ -f "$file" ] || continue
+ N1=`find "$file" -printf "%i\n"`
+
+ b=`basename $file`; d=`dirname $file`
+ XF="${b#.}"; XF="$d/${XF%.dpkg-ro-used.*}"
+ N2=`find "$XF" -printf "%i\n"` || continue
+
+ [ -n "$XF" ] || continue
+ if [ "$N1" != "$N2" ] && ! fuser -s "$file"; then
+ rm -f "$file"
+ else
+ echo "$file"
+ fi
+done >/var/lib/my_ro_hack.todel.new
+mv /var/lib/my_ro_hack.todel.new /var/lib/my_ro_hack.todel
diff --git a/aptdpkgclean.sh b/aptdpkgclean.sh
deleted file mode 100755
index 0291fdd..0000000
--- a/aptdpkgclean.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-pathmatch="^/usr"
-
-cat /var/lib/my_ro_hack.todel | while read file; do
- [ -f "$file" ] || continue
- N1=`find "$file" -printf "%i\n"`
-
- b=`basename $file`; d=`dirname $file`
- XF="${b#.}"; XF="$d/${XF%.dpkg-ro-used.*}"
- N2=`find "$XF" -printf "%i\n"` || continue
-
- [ -n "$XF" ] || continue
- if [ "$N1" != "$N2" ] && ! fuser -s "$file"; then
- rm -f "$file"
- else
- echo "$file"
- fi
-done >/var/lib/my_ro_hack.todel.new
-mv /var/lib/my_ro_hack.todel.new /var/lib/my_ro_hack.todel
diff --git a/aptdpkgro b/aptdpkgro
new file mode 100755
index 0000000..b574c88
--- /dev/null
+++ b/aptdpkgro
@@ -0,0 +1,43 @@
+#!/bin/sh
+#
+# /usr/local/sbin/aptdpkgro
+# Put together and tweaked by Jonas Smedegaard <dr@jones.dk>
+# 2001-2002
+#
+# $Id: aptdpkgro,v 1.1 2002-03-07 16:22:51 jonas Exp $
+#
+# Auto re-mounting of a readonly /usr
+# Put the following in a file below /etc/apt/apt.conf.d:
+#
+# // Auto re-mounting of a readonly /usr
+# // Based on mail from Anthony Towns <aj@azure.humbug.org.au>
+# // http://lists.debian.org/debian-devel/2001/debian-devel-200111/msg00212.html
+#
+# // This is the intended thing:
+# // DPkg {
+# // Pre-Invoke {"mount -o remount,rw /usr";};
+# // Post-Invoke {"mount -o remount,ro /usr";};
+# // };
+#
+# DPkg {
+# Pre-Install-Pkgs {"/usr/local/sbin/aptdpkgro";};
+# Pre-Invoke {"mount -o remount,rw /usr";};
+# Post-Invoke {"/usr/local/sbin/aptdpkgclean; mount -o remount,ro /usr";};
+# };
+#
+
+pathmatch="^/usr"
+
+while read debname; do
+ pkg=$(dpkg --info $debname | sed -n 's/^ Package: *//p' | head -1)
+ (dpkg -L "$pkg" 2>/dev/null || true) | grep "$pathmatch" |
+ while read file; do
+ [ -f "$file" -a ! -L "$file" ] || continue
+ dir=`dirname "$file"`;
+ base=`basename "$file"`;
+ inode=`find "$file" -printf "%i\n"`
+ [ -L "$dir/.${base}.dpkg-ro-used.$inode" ] || continue
+ (cd "$dir" && ln "$base" ".${base}.dpkg-ro-used.$inode")
+ echo "$dir/.${base}.dpkg-ro-used.$inode"
+ done >>/var/lib/my_ro_hack.todel
+done
diff --git a/aptdpkgro.sh b/aptdpkgro.sh
deleted file mode 100755
index 47da72b..0000000
--- a/aptdpkgro.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-
-pathmatch="^/usr"
-
-while read debname; do
- pkg=$(dpkg --info $debname | sed -n 's/^ Package: *//p' | head -1)
- (dpkg -L "$pkg" 2>/dev/null || true) | grep "$pathmatch" |
- while read file; do
- [ -f "$file" -a ! -L "$file" ] || continue
- dir=`dirname "$file"`;
- base=`basename "$file"`;
- inode=`find "$file" -printf "%i\n"`
- [ -L "$dir/.${base}.dpkg-ro-used.$inode" ] || continue
- (cd "$dir" && ln "$base" ".${base}.dpkg-ro-used.$inode")
- echo "$dir/.${base}.dpkg-ro-used.$inode"
- done >>/var/lib/my_ro_hack.todel
-done
diff --git a/deluser.local b/deluser.local
index 77c68ec..8acd5f5 100755
--- a/deluser.local
+++ b/deluser.local
@@ -1,4 +1,12 @@
#!/bin/sh
+#
+# /usr/local/sbin/deluser.local
+# Copyright 2001-2002 Jonas Smedegaard <dr@jones.dk>
+#
+# $Id: deluser.local,v 1.8 2002-03-07 16:22:51 jonas Exp $
+#
+# Common deluser additions for Spiff and Xenux networks
+#
OLDUSERNAME=$1
OLDUID=$2
diff --git a/faxrcvd b/faxrcvd
index 9b968d7..0ffe002 100755
--- a/faxrcvd
+++ b/faxrcvd
@@ -4,11 +4,16 @@
# Noel Burton-Krahn <noel@burton-krahn.com>
# Sept 4, 1999
#
-#
+# Modifications by Jonas Smedegaard <dr@jones.dk>
+# 2001-2002
+#
+# $Id: faxrcvd,v 1.2 2002-03-07 16:22:51 jonas Exp $
+#
# faxrcvd file devID commID error-msg
#
# modified faxrcvd from hylafax which calls faxrcvd-mail
#
+
if [ $# != 4 ]; then
echo "Usage: $0 file devID commID error-msg"
exit 1
diff --git a/faxrcvd-mail b/faxrcvd-mail
index d7ff1ee..350cbef 100755
--- a/faxrcvd-mail
+++ b/faxrcvd-mail
@@ -4,10 +4,13 @@
# Noel Burton-Krahn <noel@burton-krahn.com>
# Sept 4, 1999
#
-# Tweaks by Jonas Smedegaard <dr@jones.dk>
-# fall 2001
+# Modifications by Jonas Smedegaard <dr@jones.dk>
+# 2001-2002
+#
+# $Id: faxrcvd-mail,v 1.2 2002-03-07 16:22:51 jonas Exp $
#
# a replacement for hylafax's faxrcvd which sends the whole fax by email
+#
use strict;
diff --git a/init-mailmanarchive b/init-mailmanarchive
index edcc240..42b773f 100755
--- a/init-mailmanarchive
+++ b/init-mailmanarchive
@@ -1,4 +1,12 @@
#!/bin/bash
+#
+# /usr/local/sbin/init-mailmanarchive
+# Copyright 2002-2002 Jonas Smedegaard <dr@jones.dk>
+#
+# $Id: init-mailmanarchive,v 1.2 2002-03-07 16:22:51 jonas Exp $
+#
+# Rebuild mailman archive(s)
+#
bindir="/usr/lib/mailman/bin"
basedir="/var/lib/mailman/archives/private"
diff --git a/localdumpsql b/localdumpsql
index e6129b8..27dcc35 100755
--- a/localdumpsql
+++ b/localdumpsql
@@ -1,6 +1,14 @@
#!/bin/bash
-# /etc/cron.daily/localdumpsql: MySQL/PostgreSQL maintenance script
-# Written by Jonas Smedegaard <dr@jones.dk>
+#
+# /usr/local/sbin/localdumpsql
+# Copyright 2001-2002 Jonas Smedegaard <dr@jones.dk>
+#
+# $Id: localdumpsql,v 1.3 2002-03-07 16:22:51 jonas Exp $
+#
+# MySQL/PostgreSQL maintenance script
+#
+# Automagically runs when symlinked to /etc/cron.{daily,weekly,monthly}/
+#
# halt on errors
set -e
diff --git a/localezcreate b/localezcreate
index 857e28f..b10725f 100755
--- a/localezcreate
+++ b/localezcreate
@@ -1,6 +1,12 @@
#!/bin/bash
-# /usr/local/sbin/localezcreate: create local eZ Publish site
-# Written by Jonas Smedegaard <dr@jones.dk>
+#
+# /usr/local/sbin/localezcreate
+# Copyright 2001-2002 Jonas Smedegaard <dr@jones.dk>
+#
+# $Id: localezcreate,v 1.5 2002-03-07 16:22:51 jonas Exp $
+#
+# Create local eZ Publish site
+#
set -e
diff --git a/mkmailcerts b/localmkmailcerts
index 7a80eb2..7b5e3b4 100755
--- a/mkmailcerts
+++ b/localmkmailcerts
@@ -1,4 +1,13 @@
#!/bin/sh
+#
+# /usr/local/sbin/localmkmailcerts
+# Copyright 2001-2002 Jonas Smedegaard <dr@jones.dk>
+#
+# $Id: localmkmailcerts,v 1.1 2002-03-07 16:22:51 jonas Exp $
+#
+# Generate certificates for mail servers
+# Based on uw-imapd-ssl post-install script
+#
CWD=`pwd`
PATH=$PATH:/usr/bin/ssl
diff --git a/localmkpostfixvirtual b/localmkpostfixvirtual
index 4a996e6..654de19 100755
--- a/localmkpostfixvirtual
+++ b/localmkpostfixvirtual
@@ -1,14 +1,22 @@
#!/bin/bash
-
+#
+# /usr/local/sbin/localmkpostfixvirtual
+# Copyright 2001-2002 Jonas Smedegaard <dr@jones.dk>
+#
+# $Id: localmkpostfixvirtual,v 1.5 2002-03-07 16:22:51 jonas Exp $
+#
# Generate virtual file for postfix
#
-# Each user should have space-separated hints like "mailname1@ mailname2@gid1 mailname3@gid2"
-# stored in the "Other" field (using chfn).
+# Hints are stored in the "Other" field (using chfn).
+#
+# Each user should have space-separated hints like "mailname1@ mailname2@gid1 mailname3@gid2".
+#
+# The user of each mailgroup should have hints like "@domain1 @domain2" for each hosted domain.
+#
+# Optional: root can have hints like "postmaster@ hostmaster@ support@" (default: "postmaster@").
+#
+# TODO: reuse getent requests (drastically improves speed)
#
-# The user of each mailgroup should have hints like "@domain1 @domain2" for each hosted domain
-# stored in the "Other" field (using chfn).
-
-#TODO: reuse getent requests (drastically improves speed with multiple domains)
function get_fullname_field() { getent passwd $1 | awk -F: '{print $5}' | awk -F, '{print $1}'; }
function get_roomnumber_field() { getent passwd $1 | awk -F: '{print $5}' | awk -F, '{print $2}'; }
diff --git a/localmoffycreate b/localmoffycreate
index ca969bc..50fffbe 100755
--- a/localmoffycreate
+++ b/localmoffycreate
@@ -1,4 +1,12 @@
#!/bin/bash
+#
+# /usr/local/sbin/localmoffycreate
+# Copyright 2001 Jonas Smedegaard <dr@jones.dk>
+#
+# $Id: localmoffycreate,v 1.2 2002-03-07 16:22:51 jonas Exp $
+#
+# Create local Moffy website
+#
set -e
diff --git a/localrundig b/localrundig
index f8cb8d3..0d27c9b 100755
--- a/localrundig
+++ b/localrundig
@@ -1,12 +1,14 @@
#!/bin/sh
-
#
-# rundig
+# /usr/local/sbin/localrundig
+# Copyright 2001-2002 Jonas Smedegaard <dr@jones.dk>
#
-# $Id: localrundig,v 1.3 2002-01-27 22:33:48 jonas Exp $
+# $Id: localrundig,v 1.4 2002-03-07 16:22:51 jonas Exp $
#
-# This is a sample script to create a search database for ht://Dig.
+# Create a search database for ht://Dig.
+# Based on upstream sample script (but completely rewritten by now)
#
+
DBDIR=/var/lib/htdig
COMMONDIR=/etc/htdig
BINDIR=/usr/bin
diff --git a/localwebbbscreate b/localwebbbscreate
index 07406c1..26059ac 100755
--- a/localwebbbscreate
+++ b/localwebbbscreate
@@ -1,4 +1,12 @@
#!/bin/sh
+#
+# /usr/local/sbin/localwebbbscreate
+# Copyright 2001 Jonas Smedegaard <dr@jones.dk>
+#
+# $Id: localwebbbscreate,v 1.2 2002-03-07 16:22:51 jonas Exp $
+#
+# Create local webbbs
+#
NAME=webbbs
PATH=$PATH:/usr/local/sbin
diff --git a/localwebcalcreate b/localwebcalcreate
index f057d21..c97b673 100755
--- a/localwebcalcreate
+++ b/localwebcalcreate
@@ -1,4 +1,12 @@
#!/bin/sh
+#
+# /usr/local/sbin/localwebcalcreate
+# Copyright 2001 Jonas Smedegaard <dr@jones.dk>
+#
+# $Id: localwebcalcreate,v 1.2 2002-03-07 16:22:51 jonas Exp $
+#
+# Create local WebCAL
+#
NAME=webcal
PATH=$PATH:/usr/local/sbin
diff --git a/localwebsearch b/localwebsearch
index 7c91266..7cc32d8 100755
--- a/localwebsearch
+++ b/localwebsearch
@@ -1,6 +1,12 @@
#!/bin/bash
-# /etc/cron.daily/localwebsearch: Websearch maintenance script
-# Written by Jonas Smedegaard <dr@jones.dk>
+#
+# /usr/local/sbin/localwebsearch
+# Copyright 2001-2002 Jonas Smedegaard <dr@jones.dk>
+#
+# $Id: localwebsearch,v 1.3 2002-03-07 16:22:51 jonas Exp $
+#
+# Web search engine maintenance script
+#
# halt on errors (NB! this is a bashism...)
set -e
diff --git a/localwebstats b/localwebstats
index 437b076..6c05e54 100755
--- a/localwebstats
+++ b/localwebstats
@@ -1,6 +1,12 @@
#!/bin/bash
-# /etc/cron.daily/localstats: Webstats maintenance script
-# Written by Jonas Smedegaard <dr@jones.dk>
+#
+# /usr/local/sbin/localwebstats
+# Copyright 2001-2002 Jonas Smedegaard <dr@jones.dk>
+#
+# $Id: localwebstats,v 1.17 2002-03-07 16:22:51 jonas Exp $
+#
+# Webstats maintenance script
+#
# halt on errors (NB! this is a bashism...)
set -e
diff --git a/showlog b/showlog
index c6dcbd3..96c3803 100755
--- a/showlog
+++ b/showlog
@@ -1,6 +1,12 @@
#!/bin/bash
-# /usr/local/sbin/showlog: Show topic-specific log entries
-# Written by Jonas Smedegaard <dr@jones.dk>
+#
+# /usr/local/sbin/showlog
+# Copyright 2002 Jonas Smedegaard <dr@jones.dk>
+#
+# $Id: showlog,v 1.4 2002-03-07 16:22:51 jonas Exp $
+#
+# Show topic-specific log entries
+#
# halt on errors (NB! this is a bashism...)
set -e