diff options
author | Tony Vroon <chainsaw@gentoo.org> | 2011-07-26 13:37:11 +0000 |
---|---|---|
committer | Tony Vroon <chainsaw@gentoo.org> | 2011-07-26 13:37:11 +0000 |
commit | 5a6bc5da528678747b2266d645a33beb50e20407 (patch) | |
tree | ecf9c41c2cad77657bc06e6d79656051ce464ae7 /net-misc/asterisk | |
parent | Cleanup (diff) | |
download | historical-5a6bc5da528678747b2266d645a33beb50e20407.tar.gz historical-5a6bc5da528678747b2266d645a33beb50e20407.tar.bz2 historical-5a6bc5da528678747b2266d645a33beb50e20407.zip |
Patch from Jaco Kroon allows setvar from users.conf to work for chan_dahdi again, closes bug #374195. Patch from upstream bug #ASTERISK-18082 resolves a segmentation fault or deadlock that can occur for multiple simultaneous attended transfers.
Package-Manager: portage-2.1.10.7/cvs/Linux x86_64
Diffstat (limited to 'net-misc/asterisk')
-rw-r--r-- | net-misc/asterisk/ChangeLog | 10 | ||||
-rw-r--r-- | net-misc/asterisk/Manifest | 10 | ||||
-rw-r--r-- | net-misc/asterisk/asterisk-1.8.5.0-r3.ebuild | 436 |
3 files changed, 451 insertions, 5 deletions
diff --git a/net-misc/asterisk/ChangeLog b/net-misc/asterisk/ChangeLog index 3c0f44bd4392..666c63f14600 100644 --- a/net-misc/asterisk/ChangeLog +++ b/net-misc/asterisk/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for net-misc/asterisk # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.335 2011/07/14 08:55:33 chainsaw Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.336 2011/07/26 13:37:11 chainsaw Exp $ + +*asterisk-1.8.5.0-r3 (26 Jul 2011) + + 26 Jul 2011; Tony Vroon <chainsaw@gentoo.org> +asterisk-1.8.5.0-r3.ebuild: + Patch from Jaco Kroon allows setvar from users.conf to work for chan_dahdi + again, closes bug #374195. Patch from upstream bug #ASTERISK-18082 resolves a + segmentation fault or deadlock that can occur for multiple simultaneous + attended transfers. *asterisk-1.8.5.0-r2 (14 Jul 2011) diff --git a/net-misc/asterisk/Manifest b/net-misc/asterisk/Manifest index 17035d760c9f..155d4618fab3 100644 --- a/net-misc/asterisk/Manifest +++ b/net-misc/asterisk/Manifest @@ -18,17 +18,19 @@ DIST gentoo-asterisk-patchset-0.5.tar.bz2 6790 RMD160 ce738a36248b974d707ef74831 DIST gentoo-asterisk-patchset-0.6.tar.bz2 5115 RMD160 becb32155e126933d3e04aa1ffe6e822f7aed152 SHA1 0d7aa220afa66d88dc54da95de41e221afce4d9a SHA256 8367b43024725b257c9abfe518f09bc9c531727dff73782a5f839c369c54fb92 DIST gentoo-asterisk-patchset-0.7.tar.bz2 6278 RMD160 048a7810c2b8e4ba1613adfd438fd8727e3db210 SHA1 6e0c17b703ea367fb6cf94456c4766ebfd4159fb SHA256 4be86e7500e9e1a2ceefa93df8b6c1bf9ce0fecacfee279241da1c681f365001 DIST gentoo-asterisk-patchset-1.0.tar.bz2 7450 RMD160 53e95cae8658155697f2a9c9c809550761f3e4cd SHA1 bdccbd7d11fe0700d623c513e7e63c3639194d6c SHA256 b7af43576b3d5f3f6456ff71c0cfb93c627254f224d381686d32e43157ac0996 +DIST gentoo-asterisk-patchset-1.1.tar.bz2 11344 RMD160 b4bf8aefd32a1a3359f5056c4df0d86818ec68c1 SHA1 65e8d104d270438f104022e9782033e525577430 SHA256 41d9939d02db41d82140008a31945bb95c346bed6b451166b2d28974ed9d6fe8 EBUILD asterisk-1.6.2.18.2.ebuild 5823 RMD160 b7e7cf1d93d72661ca507cf0dae717ef348302d5 SHA1 85c8c98fc1da48d2d1437b5b83e87b31474fbfca SHA256 0b7af62d8a7056926e39733a78e391566f21c28c63a59e26f0459d386dde106b EBUILD asterisk-1.6.2.19-r1.ebuild 5828 RMD160 d3b67c872da7f9ae149f8cd9d8966c165a079e3d SHA1 4c1b7c925c72c40788ebf666f730898910580ab4 SHA256 483e0247f51aff216ad12f1bb8c556b053012cc241ec30f29c7c8ab5f9f7bba4 EBUILD asterisk-1.6.2.19-r2.ebuild 5828 RMD160 70d8188d88d2269e19567797211a626d3bfea8cc SHA1 9dd8be33d74955e5beef90a86cd268d397e46ca2 SHA256 c046df182c099451102d61bd095af7b3f5b01c093afd36c7ab1932bd8c05f01f EBUILD asterisk-1.8.4.4-r1.ebuild 14632 RMD160 0492acdd869b59f3c6f1a0efb7e9168d24b2231e SHA1 8c68dec416669bc0d5f9675288743294d30538cd SHA256 99c30aec8a536d63e192d5949828e77050ad3a8a7c2777e77a3106c887e476a3 EBUILD asterisk-1.8.5.0-r2.ebuild 14630 RMD160 5e626841eb6a00acad0332f17024e80a9b219cbb SHA1 305e33c58a30d382b975864a1493633edb533c11 SHA256 9806128e78bdc39d847e9c3c08dfc8747a89b9eb4422e581c964cc674ec101e6 -MISC ChangeLog 85004 RMD160 ea9f24765508632b3c79b2ef1afe266d40034532 SHA1 43bebed20509e86cedd517a4a4b8f349b3444abe SHA256 9e634c9bd08dfffda3e26e7a21dc6874eb0c793802145d0a2596b85f17bf984e +EBUILD asterisk-1.8.5.0-r3.ebuild 14630 RMD160 f78ab899ef3e68e18c0fbf97fa6e6682a71cb425 SHA1 fe7d6b30fbd03193227edb813b54032fa889002e SHA256 688a30736e079409f513c90cecf84a144f4394c1f892e6f31d49ae2f05bb1103 +MISC ChangeLog 85371 RMD160 c9e63e4fb75e94c2bfcc3861f2f33767dc1c313d SHA1 7b3de35f168f0ed261ce6bb861cd4f9417c8a8d3 SHA256 6c2ad7d90a75ef60ad33d64ebec6a21f6c841b80285b53f8ca1aeab1d4de2cd2 MISC metadata.xml 1104 RMD160 5b90405c685bc1c0ee173b3024afab5bc849bf40 SHA1 bf76dd265acf32efba9e4e8189ae154a4b9ebd40 SHA256 17e96f326cd60399fb217025567ae4c80f1b9b12418f1bf5b41c8fa4c49598ec -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) -iEYEARECAAYFAk4ervkACgkQp5vW4rUFj5qPSQCfYNynlB62EF0gxrTohBhHiDke -9KAAoKN1Co1fOPqD0uIBIfo4iJT3h8rb -=SLcc +iEYEARECAAYFAk4uww0ACgkQp5vW4rUFj5qb3wCfXlJvs9injmRdXbR7Lp07qyPQ +RvgAn32icBrJDU4bLM4qmZBXXJzDDyMq +=r2Yb -----END PGP SIGNATURE----- diff --git a/net-misc/asterisk/asterisk-1.8.5.0-r3.ebuild b/net-misc/asterisk/asterisk-1.8.5.0-r3.ebuild new file mode 100644 index 000000000000..0edc5b2753b8 --- /dev/null +++ b/net-misc/asterisk/asterisk-1.8.5.0-r3.ebuild @@ -0,0 +1,436 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-1.8.5.0-r3.ebuild,v 1.1 2011/07/26 13:37:11 chainsaw Exp $ + +EAPI=3 +inherit autotools base eutils linux-info multilib + +MY_P="${PN}-${PV/_/-}" + +DESCRIPTION="Asterisk: A Modular Open Source PBX System" +HOMEPAGE="http://www.asterisk.org/" +SRC_URI="http://downloads.asterisk.org/pub/telephony/asterisk/${MY_P}.tar.gz + mirror://gentoo/gentoo-asterisk-patchset-1.1.tar.bz2" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +IUSE="ais alsa bluetooth calendar +caps curl dahdi debug doc freetds gtalk h323 http iconv jabber jingle ldap lua mysql newt +samples odbc osplookup oss portaudio postgres radius snmp span speex ssl sqlite sqlite3 srtp static syslog usb vorbis" + +EPATCH_SUFFIX="patch" +PATCHES=( "${WORKDIR}/asterisk-patchset" ) + +RDEPEND="sys-libs/ncurses + dev-libs/popt + sys-libs/zlib + dev-libs/libxml2 + ais? ( sys-cluster/openais ) + alsa? ( media-libs/alsa-lib ) + bluetooth? ( net-wireless/bluez ) + calendar? ( net-libs/neon + dev-libs/libical + dev-libs/iksemel ) + caps? ( sys-libs/libcap ) + curl? ( net-misc/curl ) + dahdi? ( >=net-libs/libpri-1.4.12_beta2 + net-misc/dahdi-tools ) + freetds? ( dev-db/freetds ) + gtalk? ( dev-libs/iksemel ) + h323? ( net-libs/openh323 ) + http? ( dev-libs/gmime ) + iconv? ( virtual/libiconv ) + jabber? ( dev-libs/iksemel ) + jingle? ( dev-libs/iksemel ) + ldap? ( net-nds/openldap ) + lua? ( dev-lang/lua ) + mysql? ( dev-db/mysql ) + newt? ( dev-libs/newt ) + odbc? ( dev-db/unixODBC ) + osplookup? ( net-libs/osptoolkit + dev-libs/openssl ) + portaudio? ( media-libs/portaudio ) + postgres? ( dev-db/postgresql-base ) + radius? ( net-dialup/radiusclient-ng ) + snmp? ( net-analyzer/net-snmp ) + span? ( media-libs/spandsp ) + speex? ( media-libs/speex ) + sqlite? ( dev-db/sqlite:0 ) + sqlite3? ( dev-db/sqlite:3 ) + srtp? ( net-libs/libsrtp ) + ssl? ( dev-libs/openssl ) + usb? ( dev-libs/libusb + media-libs/alsa-lib ) + vorbis? ( media-libs/libvorbis )" + +DEPEND="${RDEPEND} + !net-misc/asterisk-addons + !net-misc/asterisk-chan_unistim + !net-misc/zaptel" + +RDEPEND="${RDEPEND} + syslog? ( virtual/logger )" + +PDEPEND="net-misc/asterisk-core-sounds + net-misc/asterisk-extra-sounds + net-misc/asterisk-moh-opsound" + +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + CONFIG_CHECK="~!NF_CONNTRACK_SIP" + local WARNING_NF_CONNTRACK_SIP="SIP (NAT) connection tracking is enabled. Some users + have reported that this module dropped critical SIP packets in their deployments. You + may want to disable it if you see such problems." + check_extra_config + + enewgroup asterisk + enewgroup dialout 20 + enewuser asterisk -1 -1 /var/lib/asterisk "asterisk,dialout" +} + +src_prepare() { + base_src_prepare + AT_M4DIR=autoconf eautoreconf +} + +src_configure() { + econf \ + --libdir="/usr/$(get_libdir)" \ + --localstatedir="/var" \ + --with-gsm=internal \ + --with-popt \ + --with-z \ + $(use_with caps cap) \ + $(use_with http gmime) \ + $(use_with newt) \ + $(use_with portaudio) \ + $(use_with ssl crypto) \ + $(use_with ssl) + + # + # blank out sounds/sounds.xml file to prevent + # asterisk from installing sounds files (we pull them in via + # asterisk-{core,extra}-sounds and asterisk-moh-opsound. + # + >"${S}"/sounds/sounds.xml + + # Compile menuselect binary for optional components + emake menuselect.makeopts + + # Broken functionality is forcibly disabled (bug #360143) + menuselect/menuselect --disable chan_misdn menuselect.makeopts + + # Utility set is forcibly enabled (bug #358001) + menuselect/menuselect --enable smsq menuselect.makeopts + menuselect/menuselect --enable streamplayer menuselect.makeopts + menuselect/menuselect --enable aelparse menuselect.makeopts + menuselect/menuselect --enable astman menuselect.makeopts + + # The others are based on USE-flag settings + if use ais; then + menuselect/menuselect --enable res_ais menuselect.makeopts + else + menuselect/menuselect --disable res_ais menuselect.makeopts + fi + if use alsa; then + menuselect/menuselect --enable chan_alsa menuselect.makeopts + else + menuselect/menuselect --disable chan_alsa menuselect.makeopts + fi + if use bluetooth; then + menuselect/menuselect --enable chan_mobile menuselect.makeopts + else + menuselect/menuselect --disable chan_mobile menuselect.makeopts + fi + if use calendar; then + menuselect/menuselect --enable res_calendar menuselect.makeopts + menuselect/menuselect --enable res_calendar_caldav menuselect.makeopts + menuselect/menuselect --enable res_calendar_ews menuselect.makeopts + menuselect/menuselect --enable res_calendar_exchange menuselect.makeopts + menuselect/menuselect --enable res_calendar_icalendar menuselect.makeopts + else + menuselect/menuselect --disable res_calendar menuselect.makeopts + menuselect/menuselect --disable res_calendar_caldav menuselect.makeopts + menuselect/menuselect --disable res_calendar_ews menuselect.makeopts + menuselect/menuselect --disable res_calendar_exchange menuselect.makeopts + menuselect/menuselect --disable res_calendar_icalendar menuselect.makeopts + fi + if use curl; then + menuselect/menuselect --enable func_curl menuselect.makeopts + menuselect/menuselect --enable res_config_curl menuselect.makeopts + menuselect/menuselect --enable res_curl menuselect.makeopts + else + menuselect/menuselect --disable func_curl menuselect.makeopts + menuselect/menuselect --disable res_config_curl menuselect.makeopts + menuselect/menuselect --disable res_curl menuselect.makeopts + fi + if use dahdi; then + menuselect/menuselect --enable app_dahdibarge menuselect.makeopts + menuselect/menuselect --enable app_dahdiras menuselect.makeopts + menuselect/menuselect --enable chan_dahdi menuselect.makeopts + menuselect/menuselect --enable codec_dahdi menuselect.makeopts + menuselect/menuselect --enable res_timing_dahdi menuselect.makeopts + else + menuselect/menuselect --disable app_dahdibarge menuselect.makeopts + menuselect/menuselect --disable app_dahdiras menuselect.makeopts + menuselect/menuselect --disable chan_dahdi menuselect.makeopts + menuselect/menuselect --disable codec_dahdi menuselect.makeopts + menuselect/menuselect --disable res_timing_dahdi menuselect.makeopts + fi + if use freetds; then + menuselect/menuselect --enable cdr_tds menuselect.makeopts + menuselect/menuselect --enable cel_tds menuselect.makeopts + else + menuselect/menuselect --disable cdr_tds menuselect.makeopts + menuselect/menuselect --disable cel_tds menuselect.makeopts + fi + if use gtalk; then + menuselect/menuselect --enable chan_gtalk menuselect.makeopts + else + menuselect/menuselect --disable chan_gtalk menuselect.makeopts + fi + if use h323; then + menuselect/menuselect --enable chan_ooh323 menuselect.makeopts + else + menuselect/menuselect --disable chan_ooh323 menuselect.makeopts + fi + if use http; then + menuselect/menuselect --enable res_http_post menuselect.makeopts + else + menuselect/menuselect --disable res_http_post menuselect.makeopts + fi + if use iconv; then + menuselect/menuselect --enable func_iconv menuselect.makeopts + else + menuselect/menuselect --disable func_iconv menuselect.makeopts + fi + if use jabber; then + menuselect/menuselect --enable res_jabber menuselect.makeopts + else + menuselect/menuselect --disable res_jabber menuselect.makeopts + fi + if use jingle; then + menuselect/menuselect --enable chan_jingle menuselect.makeopts + else + menuselect/menuselect --disable chan_jingle menuselect.makeopts + fi + if use ldap; then + menuselect/menuselect --enable res_config_ldap menuselect.makeopts + else + menuselect/menuselect --disable res_config_ldap menuselect.makeopts + fi + if use lua; then + menuselect/menuselect --enable pbx_lua menuselect.makeopts + else + menuselect/menuselect --disable pbx_lua menuselect.makeopts + fi + if use mysql; then + menuselect/menuselect --enable app_mysql menuselect.makeopts + menuselect/menuselect --enable cdr_mysql menuselect.makeopts + menuselect/menuselect --enable res_config_mysql menuselect.makeopts + else + menuselect/menuselect --disable app_mysql menuselect.makeopts + menuselect/menuselect --disable cdr_mysql menuselect.makeopts + menuselect/menuselect --disable res_config_mysql menuselect.makeopts + fi + if use odbc; then + menuselect/menuselect --enable cdr_adaptive_odbc menuselect.makeopts + menuselect/menuselect --enable cdr_odbc menuselect.makeopts + menuselect/menuselect --enable cel_odbc menuselect.makeopts + menuselect/menuselect --enable func_odbc menuselect.makeopts + menuselect/menuselect --enable res_config_odbc menuselect.makeopts + menuselect/menuselect --enable res_odbc menuselect.makeopts + else + menuselect/menuselect --disable cdr_adaptive_odbc menuselect.makeopts + menuselect/menuselect --disable cdr_odbc menuselect.makeopts + menuselect/menuselect --disable cel_odbc menuselect.makeopts + menuselect/menuselect --disable func_odbc menuselect.makeopts + menuselect/menuselect --disable res_config_odbc menuselect.makeopts + menuselect/menuselect --disable res_odbc menuselect.makeopts + fi + if use osplookup; then + menuselect/menuselect --enable app_osplookup menuselect.makeopts + else + menuselect/menuselect --disable app_osplookup menuselect.makeopts + fi + if use oss; then + menuselect/menuselect --enable chan_oss menuselect.makeopts + else + menuselect/menuselect --disable chan_oss menuselect.makeopts + fi + if use postgres; then + menuselect/menuselect --enable cdr_pgsql menuselect.makeopts + menuselect/menuselect --enable cel_pgsql menuselect.makeopts + menuselect/menuselect --enable res_config_pgsql menuselect.makeopts + else + menuselect/menuselect --disable cdr_pgsql menuselect.makeopts + menuselect/menuselect --disable cel_pgsql menuselect.makeopts + menuselect/menuselect --disable res_config_pgsql menuselect.makeopts + fi + if use radius; then + menuselect/menuselect --enable cdr_radius menuselect.makeopts + menuselect/menuselect --enable cel_radius menuselect.makeopts + else + menuselect/menuselect --disable cdr_radius menuselect.makeopts + menuselect/menuselect --disable cel_radius menuselect.makeopts + fi + if use snmp; then + menuselect/menuselect --enable res_snmp menuselect.makeopts + else + menuselect/menuselect --disable res_snmp menuselect.makeopts + fi + if use span; then + menuselect/menuselect --enable res_fax_spandsp menuselect.makeopts + else + menuselect/menuselect --disable res_fax_spandsp menuselect.makeopts + fi + if use speex; then + menuselect/menuselect --enable codec_speex menuselect.makeopts + menuselect/menuselect --enable func_speex menuselect.makeopts + else + menuselect/menuselect --disable codec_speex menuselect.makeopts + menuselect/menuselect --disable func_speex menuselect.makeopts + fi + if use sqlite; then + menuselect/menuselect --enable cdr_sqlite menuselect.makeopts + else + menuselect/menuselect --disable cdr_sqlite menuselect.makeopts + fi + if use sqlite3; then + menuselect/menuselect --enable cdr_sqlite3_custom menuselect.makeopts + menuselect/menuselect --enable cel_sqlite3_custom menuselect.makeopts + else + menuselect/menuselect --disable cdr_sqlite3_custom menuselect.makeopts + menuselect/menuselect --disable cel_sqlite3_custom menuselect.makeopts + fi + if use srtp; then + menuselect/menuselect --enable res_srtp menuselect.makeopts + else + menuselect/menuselect --disable res_srtp menuselect.makeopts + fi + if use syslog; then + menuselect/menuselect --enable cdr_syslog menuselect.makeopts + else + menuselect/menuselect --disable cdr_syslog menuselect.makeopts + fi + if use usb; then + menuselect/menuselect --enable chan_usbradio menuselect.makeopts + else + menuselect/menuselect --disable chan_usbradio menuselect.makeopts + fi + if use vorbis; then + menuselect/menuselect --enable format_ogg_vorbis menuselect.makeopts + else + menuselect/menuselect --disable format_ogg_vorbis menuselect.makeopts + fi +} + +src_compile() { + ASTLDFLAGS="${LDFLAGS}" emake || die "emake failed" +} + +src_install() { + mkdir -p "${D}"usr/$(get_libdir)/pkgconfig + emake DESTDIR="${D}" installdirs || die "emake installdirs failed" + emake DESTDIR="${D}" install || die "emake installdirs failed" + + if use samples; then + emake DESTDIR="${D}" samples || die "emake samples failed" + for conffile in "${D}"etc/asterisk/*.* + do + chown asterisk:asterisk $conffile + chmod 0660 $conffile + done + einfo "Sample files have been installed" + else + einfo "Skipping installation of sample files..." + rm -f "${D}"var/lib/asterisk/mohmp3/* + rm -f "${D}"var/lib/asterisk/sounds/demo-* + rm -f "${D}"var/lib/asterisk/agi-bin/* + rm -f "${D}"etc/asterisk/* + fi + rm -rf "${D}"var/spool/asterisk/voicemail/default + + # keep directories + diropts -m 0770 -o asterisk -g asterisk + keepdir /etc/asterisk + keepdir /var/lib/asterisk + keepdir /var/run/asterisk + keepdir /var/spool/asterisk + keepdir /var/spool/asterisk/{system,tmp,meetme,monitor,dictate,voicemail} + diropts -m 0750 -o asterisk -g asterisk + keepdir /var/log/asterisk/{cdr-csv,cdr-custom} + + newinitd "${FILESDIR}"/1.6.2/asterisk.initd3 asterisk + newconfd "${FILESDIR}"/1.6.0/asterisk.confd asterisk + + # install the upgrade documentation + # + dodoc README UPGRADE* BUGS CREDITS + + # install extra documentation + # + if use doc + then + dodoc doc/*.txt + dodoc doc/*.pdf + fi + + # install SIP scripts; bug #300832 + # + dodoc "${FILESDIR}/1.6.2/sip_calc_auth" + dodoc "${FILESDIR}/1.6.2/find_call_sip_trace.sh" + dodoc "${FILESDIR}/1.6.2/find_call_ids.sh" + dodoc "${FILESDIR}/1.6.2/call_data.txt" + + # install logrotate snippet; bug #329281 + # + insinto /etc/logrotate.d + newins "${FILESDIR}/1.6.2/asterisk.logrotate3" asterisk +} + +pkg_postinst() { + # + # Announcements, warnings, reminders... + # + einfo "Asterisk has been installed" + echo + elog "If you want to know more about asterisk, visit these sites:" + elog "http://www.asteriskdocs.org/" + elog "http://www.voip-info.org/wiki-Asterisk" + echo + elog "http://www.automated.it/guidetoasterisk.htm" + echo + elog "Gentoo VoIP IRC Channel:" + elog "#gentoo-voip @ irc.freenode.net" + echo + echo + elog "1.6 -> 1.8 changes that you may care about:" + elog "http://svn.asterisk.org/svn/${PN}/tags/${PV}/UPGRADE.txt" + elog "or: bzless ${ROOT}usr/share/doc/${PF}/UPGRADE.txt.bz2" +} + +pkg_config() { + einfo "Do you want to reset file permissions and ownerships (y/N)?" + + read tmp + tmp="$(echo $tmp | tr '[:upper:]' '[:lower:]')" + + if [[ "$tmp" = "y" ]] ||\ + [[ "$tmp" = "yes" ]] + then + einfo "Resetting permissions to defaults..." + + for x in spool run lib log; do + chown -R asterisk:asterisk "${ROOT}"var/${x}/asterisk + chmod -R u=rwX,g=rwX,o= "${ROOT}"var/${x}/asterisk + done + + chown -R root:asterisk "${ROOT}"etc/asterisk + chmod -R u=rwX,g=rwX,o= "${ROOT}"etc/asterisk + + einfo "done" + else + einfo "skipping" + fi +} |