]> andersk Git - moira.git/blobdiff - gen/cups-print.sh
stop cups earlier in this process.
[moira.git] / gen / cups-print.sh
index c60a2a8c1ea664c6593a19748b82ea753abe1d9c..3c33e9500747a05c163901b5ee0903c1cca9f7a2 100755 (executable)
@@ -21,15 +21,27 @@ CUPSLOCAL=/etc/cups
 test -r $TARFILE || exit $MR_MISSINGFILE
 test -d $CUPSLOCAL || exit $MR_MISSINGFILE
 
+# We need to kill off CUPS to prevent it from overwriting
+# state data whilst updating
+/etc/init.d/cups stop
+
+/etc/cups/bin/check-disabled.pl 2>/dev/null
+
 # Unpack the tar file, getting only files that are newer than the
 # on-disk copies (-u).
 cd /
 tar xf $TARFILE || exit $MR_TARERR
 
-# Now, make a stab at the PPD file.
-/etc/cups/bin/gen-ppd.pl
+/etc/cups/bin/post-dcm-disable.pl 2>/dev/null
+if [ -s /etc/cups/printers.conf.tmp ]; then
+    mv /etc/cups/printers.conf.tmp /etc/cups/printers.conf
+fi
+
+/etc/init.d/cups start
 
-/etc/init.d/cups restart
+# Now, make a stab at the PPD file.  This is okay to run after
+# because CUPS will pick up the new PPDs later
+/etc/cups/bin/gen-ppd.pl
 
 if [ $? != 0 ]; then
     exit $MR_MKCRED
This page took 0.033248 seconds and 4 git commands to generate.