FunKey-OS/FunKey/board/funkey/rootfs-overlay/etc/init.d/S01first_boot

29 lines
475 B
Plaintext
Raw Normal View History

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
# 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
first_boot
exit $?
fi
2020-11-16 09:10:47 +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