forked from mirrors/nixpkgs
Fix broken upstream user unit symlinks
This commit is contained in:
parent
85fdaed9de
commit
1e540af43b
|
@ -379,7 +379,12 @@ let
|
||||||
fn=${systemd}/example/systemd/${type}/$i
|
fn=${systemd}/example/systemd/${type}/$i
|
||||||
if ! [ -e $fn ]; then echo "missing $fn"; false; fi
|
if ! [ -e $fn ]; then echo "missing $fn"; false; fi
|
||||||
if [ -L $fn ]; then
|
if [ -L $fn ]; then
|
||||||
cp -pd $fn $out/
|
target="$(readlink "$fn")"
|
||||||
|
if [ ''${target:0:3} = ../ ]; then
|
||||||
|
ln -s "$(readlink -f "$fn")" $out/
|
||||||
|
else
|
||||||
|
cp -pd $fn $out/
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
ln -s $fn $out/
|
ln -s $fn $out/
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue