From 7f8938146d5dcf494f7ff5cd85da75ec2e764f9b Mon Sep 17 00:00:00 2001 From: Bernhard Tittelbach Date: Sat, 5 Dec 2009 16:31:04 +0000 Subject: use user anytun for uanytun --- gentoo-linux/net-misc/anytun/anytun-0.3.2.ebuild | 4 ++-- gentoo-linux/net-misc/uanytun/uanytun-0.3.2.ebuild | 11 +++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/gentoo-linux/net-misc/anytun/anytun-0.3.2.ebuild b/gentoo-linux/net-misc/anytun/anytun-0.3.2.ebuild index d7f850b..f693e9e 100644 --- a/gentoo-linux/net-misc/anytun/anytun-0.3.2.ebuild +++ b/gentoo-linux/net-misc/anytun/anytun-0.3.2.ebuild @@ -54,8 +54,8 @@ src_install() { pkg_config() { [ ! -d "${ROOT}"/usr/share/doc/${PF}/examples/etc/${PN} ] && \ - die "can't copy example configs since examples were not installed (reemerge with USE=\"examples\")" - for example in autostart server client1 client2 client3 p2p-a p2p-b; do + die 'can't copy example configs since examples were not installed (reemerge with USE="examples")' + for example in autostart server client1 client2 client3 p2p-a p2p-b; do [ -e "${ROOT}"/etc/${PN}/${example} ] && die "${ROOT}/etc/${PN}/${example} already present, rm -R it first" done cp -rv "${ROOT}"/usr/share/doc/${PF}/examples/etc/${PN} "${ROOT}"/etc/ || die "failed to copy examples" diff --git a/gentoo-linux/net-misc/uanytun/uanytun-0.3.2.ebuild b/gentoo-linux/net-misc/uanytun/uanytun-0.3.2.ebuild index ad59b7a..f163414 100644 --- a/gentoo-linux/net-misc/uanytun/uanytun-0.3.2.ebuild +++ b/gentoo-linux/net-misc/uanytun/uanytun-0.3.2.ebuild @@ -44,20 +44,23 @@ src_install() { cd ../ dodoc AUTHORS ChangeLog README || die "failed to install docs" + + #patch any examples to use user "antun" instad of "uanytun" + find "${D}"/usr/share/doc/${PF}/examples/etc/ -name "config" -exec sed -i 's/\(username\|groupname\) uanytun$/\1 anytun/' {} \; } pkg_config() { [ ! -d "${ROOT}"/usr/share/doc/${PF}/examples/etc/${PN} ] && \ - die "can't copy example configs since examples were not installed (reemerge with USE=\"examples\")" - for example in autostart client1 client2 client3 p2p-a p2p-b; do + die 'can't copy example configs since examples were not installed (reemerge with USE="examples")' + for example in autostart client1 client2 client3 p2p-a p2p-b; do [ -e "${ROOT}"/etc/${PN}/${example} ] && die "${ROOT}/etc/${PN}/${example} already present, rm -R it first" done cp -rv "${ROOT}"/usr/share/doc/${PF}/examples/etc/${PN} "${ROOT}"/etc/ || die "failed to copy examples" } pkg_postinst() { - enewgroup uanytun - enewuser uanytun -1 -1 /var/run/ uanytun + enewgroup anytun + enewuser anytun -1 -1 /var/run/ anytun elog "Note that each VPN gets its own directory under /etc/${PN}/" elog "(see examples provided with the package)" elog "Use the following command to create gentoo-style" -- cgit v1.2.3