Merge pull request #21137 from jerith666/cupsd-path

use symlink to ensure cupsd.conf PATH always points to a valid store path
This commit is contained in:
Nikolay Amiantov 2016-12-14 14:42:27 +03:00 committed by GitHub
commit 17d0a570ab

View File

@ -75,7 +75,7 @@ let
'') cfg.listenAddresses}
Listen /var/run/cups/cups.sock
SetEnv PATH ${bindir}/lib/cups/filter:${bindir}/bin
SetEnv PATH /var/lib/cups/path/lib/cups/filter:/var/lib/cups/path/bin
DefaultShared ${if cfg.defaultShared then "Yes" else "No"}
@ -310,6 +310,13 @@ in
for i in *; do
[ ! -e "/var/lib/cups/$i" ] && ln -s "${rootdir}/etc/cups/$i" "/var/lib/cups/$i"
done
#update path reference
[ -L /var/lib/cups/path ] && \
rm /var/lib/cups/path
[ ! -e /var/lib/cups/path ] && \
ln -s ${bindir} /var/lib/cups/path
${optionalString cfg.gutenprint ''
if [ -d /var/lib/cups/ppd ]; then
${gutenprint}/bin/cups-genppdupdate -p /var/lib/cups/ppd