- Timestamp:
- May 3, 2010, 8:50:52 AM (16 years ago)
- Location:
- branches/simtest_nebulous_branches
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
Nebulous-Server/bin/neb-voladm (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/simtest_nebulous_branches
- Property svn:mergeinfo changed
-
branches/simtest_nebulous_branches/Nebulous-Server/bin/neb-voladm
r24842 r27840 23 23 $allocate, 24 24 $available, 25 $mounted, 25 26 $db, 26 27 $dbhost, … … 31 32 $vname, 32 33 $xattr, 34 $cab_id, 33 35 ); 34 36 … … 41 43 'allocate=i' => \$allocate, 42 44 'available=i' => \$available, 45 'mounted' => \$mounted, 43 46 'db|d=s' => \$db, 44 47 'debug' => \$debug, … … 48 51 'vhost=s' => \$vhost, 49 52 'vname|n=s' => \$vname, 53 'cab_id|c=i' => \$cab_id, 50 54 'xattr=i' => \$xattr, 51 55 ) || pod2usage( 2 ); … … 56 60 57 61 # are we listing the volumes or updating? 58 if (defined $allocate or defined $available or defined $xattr ) {59 pod2usage( -msg => "Options: --allocate, --available, and --xattrRequire options --vhost or --vname", -exitval => 2 )62 if (defined $allocate or defined $available or defined $xattr or defined $cab_id) { 63 pod2usage( -msg => "Options: --allocate, --available, --xattr, and --cab_id Require options --vhost or --vname", -exitval => 2 ) 60 64 unless defined $vhost or defined $vname; 61 65 pod2usage( -msg => "Options: --allocate, --available, and --xattr Must be 0 or 1", -exitval => 2) … … 84 88 $set{'v.available'} = $available if defined $available; 85 89 $set{'v.xattr'} = $xattr if defined $xattr; 90 $set{'v.cab_id'} = $cab_id if defined $cab_id; 86 91 87 92 if (%set) { … … 97 102 die $@; 98 103 } 104 if ($mounted) { 105 eval { 106 my ($q, @bind) = sql_interp("UPDATE mountedvol AS v SET", \%set, "WHERE", \%constraint); 107 warn "$q\n" if $debug; 108 my $query = $dbh->prepare($q); 109 $query->execute(@bind); 110 $dbh->commit; 111 }; 112 if ($@) { 113 $dbh->rollback; 114 die $@; 115 } 116 } 99 117 } 100 118 … … 132 150 neb-voladm [--vname <volume name>] [--vhost <volume host>] 133 151 [--allocate <0|1>] [--available <0|1>] [--xattr <0|1>] 152 [--cab_id <cab_id>] 134 153 [--host <database host> ] [--db <database name>] 135 154 [--user <database username>] [--pass <database password>] … … 164 183 165 184 Enables/Disables these flags on the storage volume. 185 186 Requires either the C<--vname> or c<--vhost> options. 187 188 =item * --cab_id <cab_id> 189 190 Sets the cabinet id for this storage volume. 166 191 167 192 Requires either the C<--vname> or c<--vhost> options.
Note:
See TracChangeset
for help on using the changeset viewer.
