apcupsd: fix hostname command patching

The source has HOSTNAME=`hostname` (capture output of hostname command)
but currently it is replaced with HOSTNAME="/path/to/hostname" (which is
just a plain string). Fix it by substituting with
HOSTNAME=`/path/to/hostname`.
This commit is contained in:
Bjørn Forsman 2013-07-20 21:36:18 +02:00
parent 8ea138d212
commit 1d59e54ebc

View File

@ -39,7 +39,7 @@ stdenv.mkDerivation rec {
postInstall = ''
for file in "$out"/etc/apcupsd/*; do
sed -i -e 's|^WALL=.*|WALL="${utillinux}/bin/wall"|g' \
-e 's|^HOSTNAME=.*|HOSTNAME="${nettools}/bin/hostname"|g' \
-e 's|^HOSTNAME=.*|HOSTNAME=`${nettools}/bin/hostname`|g' \
"$file"
done
'';