Synced with trunk @ 15580
svn path=/nixos/branches/modular-nixos/; revision=15645
This commit is contained in:
parent
908e8fe2d4
commit
cb411d1a3d
@ -7,7 +7,15 @@ targets_=($targets)
|
||||
modes_=($modes)
|
||||
for ((i = 0; i < ${#targets_[@]}; i++)); do
|
||||
ensureDir $out/etc/$(dirname ${targets_[$i]})
|
||||
ln -s ${sources_[$i]} $out/etc/${targets_[$i]}
|
||||
if ! test -e $out/etc/${targets_[$i]}; then
|
||||
ln -s ${sources_[$i]} $out/etc/${targets_[$i]};
|
||||
else
|
||||
echo Duplicate entry "${targets_[$i]} -> ${sources_[$i]}"
|
||||
if test "$(readlink "$targets_[$i]")" -ne "$sources_[$i]"; then
|
||||
echo Mismatched duplicate entry "$(readlink "$targets_[$i]") "'<>'" $sources_[$i]"
|
||||
exit 1
|
||||
fi
|
||||
fi;
|
||||
if test "${modes_[$i]}" != symlink; then
|
||||
echo "${modes_[$i]}" > $out/etc/${targets_[$i]}.mode
|
||||
fi
|
||||
|
@ -6,8 +6,12 @@ runCommand "upstart-jobs" {inherit jobs;}
|
||||
"
|
||||
ensureDir $out/etc/event.d
|
||||
for i in $jobs; do
|
||||
if test -d $i; then
|
||||
ln -s $i/etc/event.d/* $out/etc/event.d/
|
||||
fi
|
||||
if ln -s $i . ; then
|
||||
if test -d $i; then
|
||||
ln -s $i/etc/event.d/* $out/etc/event.d/
|
||||
fi
|
||||
else
|
||||
echo Duplicate entry: $i;
|
||||
fi;
|
||||
done
|
||||
"
|
||||
|
Loading…
Reference in New Issue
Block a user