diff options
author | Yurii Kolesnykov | 2020-07-15 06:32:35 +0300 |
---|---|---|
committer | Yurii Kolesnykov | 2020-08-13 11:42:40 +0300 |
commit | d1ff86363b74103a4ac8185da9f9fdb9763fe8f0 (patch) | |
tree | a71498e70afca968e3499769c28cd6395efe7c52 /initcpio-install-systemd | |
parent | 4aa582530e423b2423a21d0fc170f53972ef344c (diff) | |
download | aur-d1ff86363b74103a4ac8185da9f9fdb9763fe8f0.tar.gz |
sync from official repo
Signed-off-by: Yurii Kolesnykov <root@yurikoles.com>
Diffstat (limited to 'initcpio-install-systemd')
-rw-r--r-- | initcpio-install-systemd | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/initcpio-install-systemd b/initcpio-install-systemd index 8fb4441f7c76..9e23070dd53f 100644 --- a/initcpio-install-systemd +++ b/initcpio-install-systemd @@ -69,10 +69,13 @@ add_systemd_unit() { map add_systemd_unit "${values[@]}" ;; Exec*) - # don't add binaries unless they are required - if [[ ${values[0]:0:1} != '-' ]]; then - add_binary "${values[0]}" - fi + # do not add binaries unless they are required, + # strip special executable prefixes + case ${values[0]} in + -*) ;; + !!*) add_binary "${values[0]#!!}" ;; + *) add_binary "${values[0]#[@!:+]}" ;; + esac ;; esac @@ -110,6 +113,7 @@ build() { add_binary /usr/bin/sulogin map add_binary \ + /usr/bin/journalctl \ /usr/bin/systemd-tmpfiles \ /usr/lib/systemd/systemd-hibernate-resume \ /usr/lib/systemd/systemd-shutdown \ @@ -118,9 +122,6 @@ build() { /usr/lib/systemd/system-generators/systemd-gpt-auto-generator \ /usr/lib/systemd/system-generators/systemd-hibernate-resume-generator - # for journalctl in emergency shell - add_binary journalctl - # udev rules and systemd units map add_udev_rule "$rules" \ 50-udev-default.rules \ @@ -171,15 +172,9 @@ build() { 'group: files' \ 'shadow: files' - echo "root:x:0:0:root:/:/bin/sh" >"$BUILDROOT/etc/passwd" - echo "root:x:0:root" >"$BUILDROOT/etc/group" - echo "root::::::::" >"$BUILDROOT/etc/shadow" - - add_systemd_drop_in systemd-udevd.service resolve-names <<EOF -[Service] -ExecStart= -ExecStart=/usr/lib/systemd/systemd-udevd --resolve-names=never -EOF + echo "root:x:0:0:root:/root:/bin/sh" >"$BUILDROOT/etc/passwd" + echo 'root:*:::::::' >"$BUILDROOT/etc/shadow" + getent group root audio disk input kmem kvm lp optical render storage tty uucp video | awk -F: ' { print $1 ":x:" $3 ":" }' >"$BUILDROOT/etc/group" add_dir "/etc/modules-load.d" ( |