29 lines
475 B
Bash
Executable File
29 lines
475 B
Bash
Executable File
#!/bin/sh
|
|
|
|
THIS=$(basename $0)
|
|
|
|
case "$1" in
|
|
start)
|
|
|
|
# Check is SWAP partition already created
|
|
sgdisk -p /dev/mmcblk0 | grep swap > /dev/null
|
|
if [ $? -ne 0 ]; then
|
|
first_boot
|
|
exit $?
|
|
fi
|
|
|
|
# Check is share partition already created
|
|
sgdisk -p /dev/mmcblk0 | grep share > /dev/null
|
|
if [ $? -ne 0 ]; then
|
|
first_boot
|
|
exit $?
|
|
fi
|
|
;;
|
|
stop)
|
|
;;
|
|
*)
|
|
echo "Usage: $0 {start|stop}" >&2
|
|
exit 1
|
|
;;
|
|
esac
|