Changeset 7cdd65d for client/bin/gutenbach-client-config
- Timestamp:
- Aug 14, 2010, 9:30:39 PM (14 years ago)
- Branches:
- master, debian, mac, no-cups
- Children:
- 618236b, 9dee329
- Parents:
- 55b24d1
- git-author:
- Kyle Brogle <broglek@…> (08/14/10 21:30:39)
- git-committer:
- Kyle Brogle <broglek@…> (08/14/10 21:30:39)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
client/bin/gutenbach-client-config
r30beeab r7cdd65d 19 19 my $delete = ""; 20 20 my $host = ""; 21 my $default = ""; 21 22 22 23 GetOptions ('l|list' => \$list, 24 's|set-default=s' => \$default, 23 25 'a|add=s' => \$add, 24 26 'd|delete=s' => \$delete, … … 30 32 mkdir "$configpath"; 31 33 } 34 #set given queue to default 35 if($default and !$add and !$delete and !$list) { 36 unless(-e "$configpath/$default") { 37 print "Error: queue '$default' doesn't exist yet...you should add it first.\n"; 38 exit 1; 39 } 40 if( -e "$configpath/DEFAULT"){ 41 unlink("$configpath/DEFAULT") or die "Couldn't remove config file '$configpath/DEFAULT'"; 42 } 43 my $symlink_exists = eval { symlink("",""); 1 }; 44 if ($symlink_exists){ 45 symlink("$configpath/$default","$configpath/DEFAULT"); 46 print "Changed default queue to $default.\n"; 47 } 48 else 49 { 50 print "Error creating symlink to $configpath/$default"; 51 exit 1; 52 } 53 } 54 55 32 56 33 57 # list the existing queues 34 if ($list and !$add and !$delete) {58 elsif ($list and !$add and !$delete and !$default) { 35 59 my @queues = glob("$configpath/*") or die "Couldn't find configuration files at '$configpath'"; 36 60
Note: See TracChangeset
for help on using the changeset viewer.