316bc350dd
The hplip-gui package uses the exact same files as the regular hplip package, plus a few extra for the UI and three changes in the configuration file. Rather than copy the entire package contents and register conflict= and provides= to fool the package manager, we can make hplip-gui depend on hplip and just manage a symlink between two alternative configuration files.
18 lines
500 B
Text
18 lines
500 B
Text
case "${ACTION}" in
|
|
pre)
|
|
# Handle the configuration symlink, if it points to the GUI config.
|
|
# The link will be replaced to the non-GUI config if that exists;
|
|
# otherwise, it will just be removed.
|
|
if [ -L etc/hp/hplip.conf ]; then
|
|
case "$(readlink etc/hp/hplip.conf 2>/dev/null)" in
|
|
""|hplip-gui.conf)
|
|
# Replace with no-gui symlink
|
|
if [ -e etc/hp/hplip-nogui.conf ]; then
|
|
ln -sf hplip-nogui.conf etc/hp/hplip.conf
|
|
else
|
|
rm etc/hp/hplip.conf
|
|
fi
|
|
;;
|
|
esac
|
|
fi
|
|
esac
|