diff options
author | Timo Teräs <timo.teras@iki.fi> | 2012-02-10 23:16:43 +0200 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2012-02-10 23:16:43 +0200 |
commit | a0d9d3b125f5cbcc9f9ad1344f2ab1154a42329a (patch) | |
tree | 3ff3e0f861223934920ad2bad157e19231e51cd1 /main | |
parent | 01c18d4be8fda8c56f4753cb720994d5afd2877f (diff) | |
download | aports-a0d9d3b125f5cbcc9f9ad1344f2ab1154a42329a.tar.bz2 aports-a0d9d3b125f5cbcc9f9ad1344f2ab1154a42329a.tar.xz |
main/asterisk: fix package directory permissions
instead of using post install script to do it
Diffstat (limited to 'main')
-rw-r--r-- | main/asterisk/APKBUILD | 13 | ||||
-rw-r--r-- | main/asterisk/asterisk.post-install | 11 | ||||
-rw-r--r-- | main/asterisk/asterisk.pre-install | 12 |
3 files changed, 13 insertions, 23 deletions
diff --git a/main/asterisk/APKBUILD b/main/asterisk/APKBUILD index 3ac8b0b155..1f03feb4d0 100644 --- a/main/asterisk/APKBUILD +++ b/main/asterisk/APKBUILD @@ -2,8 +2,10 @@ # Maintainer: Timo Teras <timo.teras@iki.fi> pkgname=asterisk pkgver=10.1.2 -pkgrel=0 +pkgrel=1 pkgdesc="Asterisk: A Module Open Source PBX System" +pkgusers="asterisk" +pkggroups="asterisk" url="http://www.asterisk.org/" arch="all" license="GPL" @@ -12,7 +14,7 @@ makedepends="autoconf automake libtool ncurses-dev popt-dev newt-dev zlib-dev postgresql-dev unixodbc-dev dahdi-tools-dev libpri-dev tar freetds-dev openssl-dev lua-dev alsa-lib-dev spandsp-dev tiff-dev libresample sqlite-dev wget speex-dev libogg-dev" -install="$pkgname.pre-install $pkgname.pre-upgrade $pkgname.post-install" +install="$pkgname.pre-install $pkgname.pre-upgrade" subpackages="$pkgname-dev $pkgname-doc $pkgname-pgsql $pkgname-odbc $pkgname-tds $pkgname-fax $pkgname-sample-config:sample $pkgname-sounds-moh:sound_moh $pkgname-sounds-en:sound_en" @@ -76,11 +78,16 @@ package() { cd "$_builddir" make -j1 DESTDIR="$pkgdir" install - install -d "$pkgdir"/var/run/asterisk + install -o asterisk -g asterisk -d "$pkgdir"/var/run/asterisk + install -o asterisk -g asterisk -d "$pkgdir"/var/lib/asterisk + install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname install -m644 -D "$srcdir"/$pkgname.logrotate \ "$pkgdir"/etc/logrotate.d/$pkgname + + chown -R asterisk:asterisk "$pkgdir"/etc/asterisk + chmod -R u=rwX,g=rX,o= "$pkgdir"/etc/asterisk } _move_dir() { diff --git a/main/asterisk/asterisk.post-install b/main/asterisk/asterisk.post-install deleted file mode 100644 index fd51c7fa5d..0000000000 --- a/main/asterisk/asterisk.post-install +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -chown -R asterisk:asterisk /var/*/asterisk -chown -R asterisk:asterisk /etc/asterisk -chmod -R u=rwX,g=rX,o= /etc/asterisk - -# set IP ToS -# iptables -A OUTPUT -t mangle -p udp -m udp --dport 5060 -j DSCP --set-dscp 0x28 -#iptables -A OUTPUT -t mangle -p udp -m udp --sport 10000:20000 -j DSCP --set-dscp 0x28 -# more info: http://www.voip-info.org/wiki-Asterisk+non-root - diff --git a/main/asterisk/asterisk.pre-install b/main/asterisk/asterisk.pre-install index 09985d7cdb..6c2984ae4e 100644 --- a/main/asterisk/asterisk.pre-install +++ b/main/asterisk/asterisk.pre-install @@ -1,12 +1,6 @@ #!/bin/sh -user=asterisk -home=/var/lib/asterisk -adduser -h $home -s /bin/false -D $user 2>/dev/null -mkdir -p $home -chown $user:$user $home - -addgroup dialout 2>/dev/null -addgroup $user dialout 2>/dev/null +adduser -S -h /var/lib/asterisk -s /bin/false -D asterisk 2>/dev/null +addgroup -S dialout 2>/dev/null +addgroup asterisk dialout 2>/dev/null exit 0 - |