summaryrefslogtreecommitdiff
path: root/localmkpostfixvirtual
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2006-08-02 16:01:40 +0000
committerJonas Smedegaard <dr@jones.dk>2006-08-02 16:01:40 +0000
commit68291754d40f311426df1fc8aa4400b0517a4392 (patch)
treeefa681df1688608815107aa1316e720b58c00c8a /localmkpostfixvirtual
parent6c595f59eeb2f9436bea16dec6c9532512bf717e (diff)
Drop superfluous keyword 'function' and the script should work with plais sh.
Diffstat (limited to 'localmkpostfixvirtual')
-rwxr-xr-xlocalmkpostfixvirtual20
1 files changed, 10 insertions, 10 deletions
diff --git a/localmkpostfixvirtual b/localmkpostfixvirtual
index f093d00..40bcc17 100755
--- a/localmkpostfixvirtual
+++ b/localmkpostfixvirtual
@@ -1,9 +1,9 @@
-#!/bin/bash
+#!/bin/sh
#
# /usr/local/sbin/localmkpostfixvirtual
# Copyright 2001-2002 Jonas Smedegaard <dr@jones.dk>
#
-# $Id: localmkpostfixvirtual,v 1.19 2006-08-02 16:00:12 jonas Exp $
+# $Id: localmkpostfixvirtual,v 1.20 2006-08-02 16:01:40 jonas Exp $
#
# Generate virtual file for postfix
#
@@ -38,15 +38,15 @@
# TODO: Write command "members" as internal code
#
-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}'; }
-function get_other_field() { getent passwd $1 | awk -F: '{print $5}' | awk -F, '{print $5}'; }
-function get_groups() { groups $1 | sed -e 's/^.*: //' -e "s/\( \+\|^\)$1\( \+\|$\)/\1/"; }
-function get_domain() { echo $1 | egrep "^@[\.[:alnum:]-]+$" | sed -e 's/@//'; }
-function get_account() { echo $1 | egrep "^([\.[:alnum:]_-]+|\+)@($gid|$maildomain)?$" | sed -e 's/@.*//'; }
-function sort_u() { for x in $@; do echo $x; done | sort -u; }
+get_fullname_field() { getent passwd $1 | awk -F: '{print $5}' | awk -F, '{print $1}'; }
+get_roomnumber_field() { getent passwd $1 | awk -F: '{print $5}' | awk -F, '{print $2}'; }
+get_other_field() { getent passwd $1 | awk -F: '{print $5}' | awk -F, '{print $5}'; }
+get_groups() { groups $1 | sed -e 's/^.*: //' -e "s/\( \+\|^\)$1\( \+\|$\)/\1/"; }
+get_domain() { echo $1 | egrep "^@[\.[:alnum:]-]+$" | sed -e 's/@//'; }
+get_account() { echo $1 | egrep "^([\.[:alnum:]_-]+|\+)@($gid|$maildomain)?$" | sed -e 's/@.*//'; }
+sort_u() { for x in $@; do echo $x; done | sort -u; }
-function print_accounts() {
+print_accounts() {
uid=$1
maildomain=$2
pre_text=$3