wok-current diff cyrus-imapd/receipt @ rev 3427

ruby,xchm,xine-ui,xrick: Remove dep on libiconv
author Christophe Lincoln <pankso@slitaz.org>
date Sat Jun 13 13:13:25 2009 +0200 (2009-06-13)
parents 79e6c7e5b6d3
children 8d23268c7571
line diff
     1.1 --- a/cyrus-imapd/receipt	Fri Mar 06 10:53:07 2009 +0000
     1.2 +++ b/cyrus-imapd/receipt	Sat Jun 13 13:13:25 2009 +0200
     1.3 @@ -64,10 +64,10 @@
     1.4  		chroot $1/ sh -c 'addgroup mail && addgroup cyrus mail'
     1.5  		status
     1.6  	fi
     1.7 -	chown -R cyrus.mail /var/spool/imap /var/imap
     1.8 +	chroot $1/ chown -R cyrus.mail /var/spool/imap /var/imap
     1.9  	while read name port end; do
    1.10 -		grep -q $port /etc/services || \
    1.11 -			echo "$name		$port	$end" >> /etc/services
    1.12 +		grep -q $port $1/etc/services || \
    1.13 +			echo "$name		$port	$end" >> $1/etc/services
    1.14  	done <<EOF
    1.15  pop3 110/tcp pop-3
    1.16  nntp 119/tcp readnews untp
    1.17 @@ -83,27 +83,27 @@
    1.18  fud 4201/udp
    1.19  EOF
    1.20  	[ -z "$1" ] && /etc/init.d/$PACKAGE start
    1.21 -	if [ -z "$1" -a -f /etc/init.d/postfix ]; then
    1.22 -		if ! grep -v ^# /etc/postfix/main.cf | grep -q lmtp:unix; then
    1.23 +	if [ -f $1/etc/init.d/postfix ]; then
    1.24 +		if ! grep -v ^# $1/etc/postfix/main.cf | grep -q lmtp:unix; then
    1.25  			echo "Append to /etc/postfix/main.cf:"
    1.26  			echo -n "    "
    1.27  			echo "mailbox_transport = lmtp:unix:/var/imap/socket/lmtp" | \
    1.28 -				tee -a /etc/postfix/main.cf
    1.29 -			/etc/init.d/postfix start || /etc/init.d/postfix reload
    1.30 +				tee -a $1/etc/postfix/main.cf
    1.31 +			if [ -z "$1" ]; then
    1.32 +				/etc/init.d/postfix start || /etc/init.d/postfix reload
    1.33 +			fi
    1.34  		fi
    1.35  	fi
    1.36  	msg="Creating mailbox for"
    1.37 -	[ -z "$1" ] &&
    1.38 -	for i in root $(awk -F: '{ if ($3 >= 1000) print $1 }' < /etc/passwd); do
    1.39 +	for i in root $(awk -F: '{ if ($3 >= 1000) print $1 }' < $1/etc/passwd); do
    1.40  		echo -n "$msg $i"
    1.41  		msg=","
    1.42  	done
    1.43  	echo ""
    1.44 -	[ -z "$1" ] &&
    1.45 -	for i in root $(awk -F: '{ if ($3 >= 1000) print $1 }' < /etc/passwd); do
    1.46 +	for i in root $(awk -F: '{ if ($3 >= 1000) print $1 }' < $1/etc/passwd); do
    1.47  		echo "createmailbox user.$i"
    1.48 -	done | cyradm -u cyrus -w cyrus 127.0.0.1 >/dev/null 2>&1
    1.49 -	su -c "/usr/cyrus/bin/reconstruct" cyrus >/dev/null 2>&1
    1.50 +	done | chroot $1/ cyradm -u cyrus -w cyrus 127.0.0.1 >/dev/null 2>&1
    1.51 +	chroot $1/ su -c "/usr/cyrus/bin/reconstruct" cyrus >/dev/null 2>&1
    1.52  	cat <<EOF
    1.53  ----
    1.54  Users must have a password to access the mailbox.