Changeset 1928 in MondoRescue for branches/2.2.6/mindi/mindi
- Timestamp:
- Apr 18, 2008, 3:14:36 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.6/mindi/mindi
r1927 r1928 293 293 incoming=`ReadLine` 294 294 done 295 }296 297 298 CopyImageToDisk() {299 local image dev procno res comment300 image=$1301 dev=$2302 comment=$3303 [ ! -f "$image" ] && [ ! -b "$image" ] && Die "Image $image does not exist. Did you run out of disk space?"304 Prompt "About to write $comment. Please press ENTER."305 echo -en "Formatting disk..."306 if which fdformat > /dev/null ; then307 fdformat -n $dev > /dev/null 2> /dev/null || Die "Cannot format $dev - is your Linux distro broken?"308 elif which superformat > /dev/null ; then309 superformat $dev > /dev/null 2> /dev/null || Die "Cannot format $dev - is your Linux distro broken?"310 else311 Die "Please install either fdformat or superformat."312 fi313 echo -en "\nWriting $comment"314 if echo $image | grep "mindi-[r|b]oot\.1440" &> /dev/null ; then315 cat $image > $dev &316 else317 dd if=$image of=$dev &> /dev/null &318 fi319 procno=$!320 ps $procno > /dev/null 2> /dev/null321 while [ "$?" -eq "0" ] ; do322 sleep 3323 echo -en "."324 ps $procno > /dev/null 2> /dev/null325 done326 echo -e "$DONE"327 LogIt "$comment has been written."328 295 } 329 296
Note:
See TracChangeset
for help on using the changeset viewer.