- Timestamp:
- Jul 30, 2010, 9:31:50 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20100621/Nebulous-Server/bin/nebdiskd
r27103 r28794 53 53 # set the process name for easy pgrep-ability 54 54 $0 = 'nebdiskd'; 55 my $rcfile = "$ENV{HOME}/.nebdiskrc"; 55 #my $rcfile = "$ENV{HOME}/.nebdiskrc"; 56 my $rcfile = $ENV{NEBDISKDRC}; 57 unless (defined($rcfile)) { 58 $rcfile = '/etc/nebdiskd.rc'; 59 } 56 60 $rcfile = File::Spec->canonpath($rcfile); 57 61 … … 71 75 my %host_removed = (); 72 76 my $failure_limit = 5; 73 74 75 77 76 78 #my $mounts = $c->get_mounts; … … 143 145 $SIG{HUP} = sub { $c = read_rcfile($rcfile) }; 144 146 147 my $date = localtime(); 148 $log->warn("BEGIN: $date with RCFILE: $rcfile"); 145 149 146 150 while (1) { … … 187 191 188 192 eval { 189 my $r_query = $dbh->prepare_cached("REPLACE INTO mountedvol SELECT vol_id,name,host,path,allocate,available,xattr,mountpoint, ?, ? FROM volume WHERE mountpoint = ?");193 my $r_query = $dbh->prepare_cached("REPLACE INTO mountedvol SELECT vol_id,name,host,path,allocate,available,xattr,mountpoint, ?, ?,note FROM volume WHERE mountpoint = ?"); 190 194 # my $d_query = $dbh->prepare_cached("UPDATE mountedvol SET allocate = ?, available = ? WHERE mountpoint = ?"); 191 195 my $d_query = $dbh->prepare_cached("DELETE FROM mountedvol WHERE mountpoint = ?"); … … 224 228 } 225 229 }; 230 231 # fetch stats on the mounted device. this has to be done AFTER 232 # we determine if it's a valid mountpoint incase 233 # is_mountpoint() invokes the automounter 234 my $dev_info = df($mountpoint, 1024); 235 unless (defined $dev_info) { 236 $valid_mountpoint = 0; 237 } 238 226 239 if (!$valid_mountpoint) { 227 240 # try is_mountpoint() again if $retry > 1 … … 254 267 # we determine if it's a valid mountpoint incase 255 268 # is_mountpoint() invokes the automounter 256 my$dev_info = df($mountpoint, 1024);269 $dev_info = df($mountpoint, 1024); 257 270 unless (defined $dev_info) { 258 271 $log->error("can't find device info for $mountpoint");
Note:
See TracChangeset
for help on using the changeset viewer.
