commit:     8f6433c8eb43faef9a1b87de9534c54c0bc4c07f
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 29 03:48:07 2023 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sat Apr 29 03:48:07 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8f6433c8

net-dialup/ppp: install tmpfiles snippet to create /run/pppd

Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 net-dialup/ppp/files/pppd.tmpfiles                          | 2 ++
 net-dialup/ppp/{ppp-2.5.0-r1.ebuild => ppp-2.5.0-r2.ebuild} | 7 ++++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/net-dialup/ppp/files/pppd.tmpfiles 
b/net-dialup/ppp/files/pppd.tmpfiles
new file mode 100644
index 000000000000..81b402e77055
--- /dev/null
+++ b/net-dialup/ppp/files/pppd.tmpfiles
@@ -0,0 +1,2 @@
+d /run/pppd
+L /run/pppd/lock - - - - ../lock

diff --git a/net-dialup/ppp/ppp-2.5.0-r1.ebuild 
b/net-dialup/ppp/ppp-2.5.0-r2.ebuild
similarity index 96%
rename from net-dialup/ppp/ppp-2.5.0-r1.ebuild
rename to net-dialup/ppp/ppp-2.5.0-r2.ebuild
index 9e490709f159..cf06b10cd4b8 100644
--- a/net-dialup/ppp/ppp-2.5.0-r1.ebuild
+++ b/net-dialup/ppp/ppp-2.5.0-r2.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-inherit linux-info pam
+inherit linux-info pam tmpfiles
 
 PATCH_TARBALL_NAME="${PN}-2.4.9-patches-03"
 DESCRIPTION="Point-to-Point Protocol (PPP)"
@@ -79,6 +79,9 @@ src_install() {
        else
                newsbin contrib/pppgetpass/pppgetpass.vt pppgetpass
        fi
+
+       newtmpfiles "${FILESDIR}/pppd.tmpfiles" pppd.conf
+
        # Missing from upstream tarball
        # https://github.com/ppp-project/ppp/pull/412
        #doman contrib/pppgetpass/pppgetpass.8
@@ -86,6 +89,8 @@ src_install() {
 }
 
 pkg_postinst() {
+       tmpfiles_process pppd.conf
+
        local CONFIG_CHECK="~PPP ~PPP_ASYNC ~PPP_SYNC_TTY"
        local ERROR_PPP="CONFIG_PPP:\t missing PPP support (REQUIRED)"
        local ERROR_PPP_ASYNC="CONFIG_PPP_ASYNC:\t missing asynchronous serial 
line discipline"

Reply via email to