
01-03-2009
|
|
Shell programmer, author
|
|
|
Join Date: Mar 2007
Location: Toronto, Canada
Posts: 2,380
|
|
Quote:
Originally Posted by em23
here is are the changes that i made.
Code:
#!/usr/bin/ksh
if [ -e /etc/dmi/conf/ ]; then #check to see if /etc/dmi/conf exists
mv conf conf.orig # move the file to .orig
|
What are you trying to move? You haven't checked whether there is a file (or directory) called conf in the current directory.
Quote:
|
Code:
else
print "/etc/dmi/conf does not exist"
|
How do you know that /etc/dmi/conf doesn't exist? You didn't test for it; you tested for a directory of that name.
The same comments apply to the next section as well.
Quote:
|
Code:
fi
if [ -e /etc/snmp/conf/ ]; then # check to see if /etc/snmp/conf exists
mv conf conf.orig # move the conf to .orig
else
print "/etc/snmp/conf does not exist"
fi
|
|