Return to rc.er CVS log | Up to [ELWIX - Embedded LightWeight unIX -] / elwix / config / etc / rootfs |
1.2 misho 1: #!/bin/sh
2: #
3: # Shell script for cfg ER help
4: #
5:
6: CFG_NAND_MAP="/dev/ada0g"
1.3 ! misho 7: CFG_NAND_SIZE=524288
1.2 misho 8:
9: cd ${2:-/etc}
10:
11: case "$1" in
12: load)
13: echo "Tries emergency load of NAND ..."
14: dd if=${CFG_NAND_MAP} bs=${CFG_NAND_SIZE} 2>&- | \
15: gunzip 2>&- | cpio -iud 2>&- || exit 1
16: echo "NAND loaded successfully!"
17: ;;
18: erase)
19: dd if=/dev/zero of=${CFG_NAND_MAP} bs=${CFG_NAND_SIZE} \
20: count=1 conv=sync 2>&- || exit 1
21: echo "Config NAND was erased!"
22: ;;
23: *)
24: echo "Missing parameter - available options are (load | erase)"
25: ;;
26: esac