Skip to content

Commit

Permalink
systemd.eclass: Sanitize insopts
Browse files Browse the repository at this point in the history
Sanitize insopts when calling doins, in order to avoid prior insopts
calls accidentally affecting do*/new* functions defined by the eclass.
  • Loading branch information
mgorny committed Jun 13, 2018
1 parent d2e9c4a commit 4912da3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions eclass/systemd.eclass
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ systemd_dounit() {
debug-print-function ${FUNCNAME} "${@}"

(
insopts -m 0644
insinto "$(_systemd_get_systemunitdir)"
doins "${@}"
)
Expand All @@ -165,6 +166,7 @@ systemd_newunit() {
debug-print-function ${FUNCNAME} "${@}"

(
insopts -m 0644
insinto "$(_systemd_get_systemunitdir)"
newins "${@}"
)
Expand All @@ -179,6 +181,7 @@ systemd_douserunit() {
debug-print-function ${FUNCNAME} "${@}"

(
insopts -m 0644
insinto "$(_systemd_get_userunitdir)"
doins "${@}"
)
Expand All @@ -193,6 +196,7 @@ systemd_newuserunit() {
debug-print-function ${FUNCNAME} "${@}"

(
insopts -m 0644
insinto "$(_systemd_get_userunitdir)"
newins "${@}"
)
Expand Down Expand Up @@ -222,6 +226,7 @@ systemd_install_serviced() {
[[ ${service} == *.d ]] && die "Service must not have .d suffix"

(
insopts -m 0644
insinto /etc/systemd/system/"${service}".d
newins "${src}" 00gentoo.conf
)
Expand All @@ -241,6 +246,7 @@ systemd_dotmpfilesd() {
done

(
insopts -m 0644
insinto /usr/lib/tmpfiles.d/
doins "${@}"
)
Expand All @@ -258,6 +264,7 @@ systemd_newtmpfilesd() {
|| die 'tmpfiles.d files need to have .conf suffix.'

(
insopts -m 0644
insinto /usr/lib/tmpfiles.d/
newins "${@}"
)
Expand Down Expand Up @@ -320,6 +327,7 @@ systemd_enable_ntpunit() {
done

(
insopts -m 0644
insinto "$(_systemd_get_utildir)"/ntp-units.d
doins "${T}"/${ntpunit_name}.list
)
Expand Down

0 comments on commit 4912da3

Please sign in to comment.