Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 490820 - =net-dialup/ppp-2.4.5-r3 has 50-initd.sh scripts break if openrc is not active
Summary: =net-dialup/ppp-2.4.5-r3 has 50-initd.sh scripts break if openrc is not active
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Dialup Developers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-09 08:50 UTC by Martin Väth
Modified: 2014-06-16 14:19 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Väth 2013-11-09 08:50:03 UTC
net-dialup/ppp-2.4.5-r3 (and I guess also earlier versions) installs two openrc/netifrc callback files

/etc/ppp/ip-down.d/50-initd.sh
/etc/ppp/ip-up.d/50-initd.sh

These files should only be sourced/executed if openrc was used to start the machine (it gives at least strange error messages if e.g. the system was started with systemd or some other init system). Therefore, I suggest to guard these two files by adding

if test -r /run/openrc/softlevel; then
...
fi

as the second or last line, respectively, which avoids sourcing/executing the callback if openrc is not active. (Note that a trivial "guard" like
test -r /run/openrc/softlevel || exit 0
as the first line would *not* work, since the files are sourced, and so the "exit" would exit the sourcing shell which would prevent sourcing of later files in /etc/ppp/ip-{up,down}.d)

Maybe one should add a similar callback mechanism for systemd, but the systemd maintainers have to decide which mechanisms should be used on gentoo to mark whether/when net support is really available. The above issue can and should be fixed independently of such a decision.
Comment 1 Sergey Popov gentoo-dev 2014-06-16 14:19:00 UTC
+*ppp-2.4.6-r1 (16 Jun 2014)
+
+  16 Jun 2014; Sergey Popov <pinkbyte@gentoo.org> +ppp-2.4.6-r1.ebuild:
+  Revision bump: add missing 'die' to sed calls. Call OpenRC scripts only when
+  OpenRC is active init-system, wrt bug #490820. Fix issue with logwtmp not
+  working properly