Permalink
Browse files

Dont run upgrade script if missing /etc/cloudprint.conf

  • Loading branch information...
simoncadman committed Feb 23, 2014
1 parent 79f081a commit 0f572cb0541823f09dd8c38885611f0110073782
Showing with 18 additions and 8 deletions.
  1. +1 −1 backend.py
  2. +1 −1 deleteaccount.py
  3. +1 −1 dynamicppd.py
  4. +5 −0 full-test.sh
  5. +1 −1 listcloudprinters.py
  6. +1 −1 listdrivefiles.py
  7. +1 −1 reportissues.py
  8. +1 −1 setupcloudprint.py
  9. +6 −1 upgrade.py
View
@@ -22,7 +22,7 @@
if len(sys.argv) == 2 and sys.argv[1] == 'version':
# line below is replaced on commit
- CCPVersion = "20140223 200749"
+ CCPVersion = "20140223 203304"
print "CUPS Cloud Print CUPS Backend Version " + CCPVersion
sys.exit(0)
View
@@ -22,7 +22,7 @@
if len(sys.argv) == 2 and sys.argv[1] == 'version':
# line below is replaced on commit
- CCPVersion = "20140223 200749"
+ CCPVersion = "20140223 203304"
print "CUPS Cloud Print Delete Account Script Version " + CCPVersion
sys.exit(0)
View
@@ -20,7 +20,7 @@
if len(sys.argv) == 2 and sys.argv[1] == 'version':
# line below is replaced on commit
- CCPVersion = "20140223 200749"
+ CCPVersion = "20140223 203304"
print "CUPS Cloud Print Dynamic PPD Generator Version " + CCPVersion
sys.exit(0)
View
@@ -4,6 +4,11 @@ set -e
cd "`dirname $0`"
+if [[ $1 == "" ]]; then
+ echo "This script is designed to be ran when creating packages, it shouldn't normally be ran by end users"
+ exit 1
+fi
+
export name="$1"
export category="$2"
export testconfig="$5"
View
@@ -26,7 +26,7 @@
if len(sys.argv) == 2 and sys.argv[1] == 'version':
# line below is replaced on commit
- CCPVersion = "20140223 200749"
+ CCPVersion = "20140223 203304"
print "CUPS Cloud Print Printer Lister Version " + CCPVersion
sys.exit(0)
View
@@ -22,7 +22,7 @@
if len(sys.argv) == 2 and sys.argv[1] == 'version':
# line below is replaced on commit
- CCPVersion = "20140223 200749"
+ CCPVersion = "20140223 203304"
print "CUPS Cloud Print Printer Drive Lister Version " + CCPVersion
sys.exit(0)
View
@@ -21,7 +21,7 @@
if len(sys.argv) == 2 and sys.argv[1] == 'version':
# line below is replaced on commit
- CCPVersion = "20140223 200749"
+ CCPVersion = "20140223 203304"
print "CUPS Cloud Print Issue Reporting Script Version " + CCPVersion
sys.exit(0)
View
@@ -22,7 +22,7 @@
if len(sys.argv) == 2 and sys.argv[1] == 'version':
# line below is replaced on commit
- CCPVersion = "20140223 200749"
+ CCPVersion = "20140223 203304"
print "CUPS Cloud Print Setup Script Version " + CCPVersion
sys.exit(0)
View
@@ -26,6 +26,11 @@
from printer import Printer
Utils.SetupLogging()
+ if not os.path.exists("/etc/cloudprint.conf"):
+ sys.stderr.write("Config is invalid or missing, not running on fresh install\n")
+ logging.error("Upgrade tried to run on fresh install");
+ sys.exit(0)
+
requestors, storage = Auth.SetupAuth(False)
if requestors == False:
sys.stderr.write("Config is invalid or missing\n")
@@ -34,7 +39,7 @@
printerItem = Printer(requestors)
# line below is replaced on commit
- CCPVersion = "20140223 200749"
+ CCPVersion = "20140223 203304"
if len(sys.argv) == 2 and sys.argv[1] == 'version':
print "CUPS Cloud Print Upgrade Script Version " + CCPVersion

0 comments on commit 0f572cb

Please sign in to comment.