28 lines
320 B
Bash
28 lines
320 B
Bash
#!/bin/sh
|
|
|
|
. /env/config
|
|
|
|
image=/env/bin/magic.bin
|
|
part=$ageing
|
|
|
|
if [ \! -e "$part" ]; then
|
|
echo "Partition $part does not exist"
|
|
exit 1
|
|
fi
|
|
|
|
unprotect $part
|
|
|
|
echo
|
|
echo "Erasing partition $part"
|
|
erase $part
|
|
|
|
echo
|
|
echo "Creating magic"
|
|
cp $image $part
|
|
|
|
echo
|
|
echo "Testing partition"
|
|
. /env/bin/_alternate
|
|
|
|
protect $part
|