--- /usr/lib/initcpio/install/systemd 2014-09-02 00:11:28.000000000 +0630 +++ /etc/initcpio/install/systemd 2014-10-16 08:19:52.056150823 +0630 @@ -51,7 +51,7 @@ local unit= rule= entry= key= value= binary= dep= - unit=$(PATH=/usr/lib/systemd/system:/lib/systemd/system type -P "$1") + unit=$(PATH=/etc/systemd/system:/usr/lib/systemd/system:/lib/systemd/system type -P "$1") if [[ -z $unit ]]; then # complain about not found unit file return 1 @@ -78,18 +78,23 @@ done <"$unit" # preserve reverse soft dependency - for dep in {/usr,}/lib/systemd/system/*.wants/${unit##*/}; do + for dep in {{/usr,}/lib,/etc}/systemd/system/*.wants/${unit##*/}; do if [[ -L $dep ]]; then add_symlink "$dep" fi done # add hard dependencies - if [[ -d $unit.requires ]]; then - for dep in "$unit".requires/*; do - add_systemd_unit ${dep##*/} - done - fi + for dir in {{/usr,}/lib,/etc}/systemd/system/${unit##*/}.requires; do + if [[ -d "$dir" ]]; then + for dep in "$dir"/*; do + if [[ -L $dep ]]; then + add_symlink "$dep" + fi + add_systemd_unit ${dep##*/} + done + fi + done } build() {