I'm trying to implement quota's using the quota interface for perl. The
problem I'm having is when I execute this code. 

#!/usr/bin/perl

use Getopt::Std;
use Quota;

getopt("f:s:h:");
die "Usage: $0 -f <filesystem> -s <soft quota> -h <hard quota>\n"
        if(!$opt_f || !$opt_s || !$opt_h);

open(PASS, "/etc/passwd") or die "Unable to open users file\n";
@array = <PASS>;
close(PASS);

$dev = Quota::getqcarg($opt_f) or die "Unable to translate path $opt_f:
$!\n";

foreach $i (@array) {
        $i =~ /(\w+):x:(\d+)/;

                unless($2 <= 500) {

                        ($block_curr, $block_soft, $block_hard,
$block_timelimit, $inode_curr,
                        $inode_soft, $inode_hard, $inode_timelimit) =
                        Quota::query($dev ,$2);

                        Quota::setqlim($dev, $2, $opt_s, $opt_h,
$inode_soft, $inode_hard, 1) or
                        die "Unable to set quota's: $!\n";


I get this error message.
Unable to set quota's: No such file or directory

I'm out of ideas. 
thanks

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to