2020-05-09 22:49:37 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
THIS=$(basename $0)
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
start)
|
2020-11-16 09:10:47 +00:00
|
|
|
|
2020-11-16 10:12:20 +00:00
|
|
|
# Check is SWAP partition already created
|
|
|
|
sgdisk -p /dev/mmcblk0 | grep swap > /dev/null
|
2020-11-16 09:10:47 +00:00
|
|
|
if [ $? -ne 0 ]; then
|
2020-11-16 10:12:20 +00:00
|
|
|
first_boot
|
|
|
|
exit $?
|
|
|
|
fi
|
2020-11-16 09:10:47 +00:00
|
|
|
|
2020-11-16 10:12:20 +00:00
|
|
|
# Check is share partition already created
|
|
|
|
sgdisk -p /dev/mmcblk0 | grep share > /dev/null
|
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
first_boot
|
|
|
|
exit $?
|
|
|
|
fi
|
2020-05-09 22:49:37 +01:00
|
|
|
;;
|
|
|
|
stop)
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "Usage: $0 {start|stop}" >&2
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|