checking filesystem
hi i know the chkfsys utility and know how to check through command line . but i want to check in script .
i have cf having 4 partition . 1st partition having qnx image . after booting i have to check filesystem on other partition . if any error having those partition i have to display the error and shutdown . i don't how to do it. please help me to check filesystem in scipting and take decission . questions: 1) if error on any partition ,chkfsys utility returns anythink? 2) how to take decissions if errors occur? 3) how i kow this partition is error?. note:i have partition type- hd0t77,hd0t78,hd0t79,hd0t80 i checked below script but this is also not working . "status:not found" error is comming , #!/bin/sh ###### # My Test Script ###### echo Test Chkfsys Output chkfsys -u /dev/hd0t77 $1 STATUS=$? if test STATUS -ne 0 then echo "An error occured while running chkfsys!" else echo"error not occured" fi # end of Test Script please help me, thanks and regards, ganesan |
see man page, or here: http://www.qnx.com/developers/docs/q...g_chkfsys.html
chkfsys will return nonzero in case of problems. you need to use $ in your test command: if test $STATUS -ne 0 |
Quote:
Quote:
Quote:
Quote:
http://www.linuxquestions.org/questi...em-4175511911/ You're getting "not found", because you just put "chkfsys" in your script, probably. Try putting the whole path into the script...and again, reading the bash scripting tutorials wouldn't be a bad idea. |
hi ,
i have one question, can mount the corrupted filesystem partition? regards, ganesan |
Quote:
|
All times are GMT -5. The time now is 06:10 PM. |