diff --git a/mxstartup2mxvipcfg b/mxstartup2mxvipcfg index f5497f6..6144b1a 100755 --- a/mxstartup2mxvipcfg +++ b/mxstartup2mxvipcfg @@ -23,6 +23,11 @@ while(!($packed_ip=gethostbyname($fullhostname))) { my $hostip = inet_ntoa($packed_ip); +unless(-d $rundir and -w $rundir) { + print STDERR "can't write to directory $rundir\n"; + exit 1; +} + @lines = read_file($configfile); my ($host, $user, $script, $ip);