mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-29 22:26:31 +00:00
datapart init script: do not do anything at stop
This commit is contained in:
parent
0c5ce8c19f
commit
5281a3dfe6
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
test -n "$os_version" || source /etc/init.d/base
|
test -n "$os_version" || source /etc/init.d/base
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
msg_begin "Detecting disk device"
|
msg_begin "Detecting disk device"
|
||||||
root_dev=$(cat /proc/cmdline | grep -oE 'root=[/a-z0-9]+' | cut -d '=' -f 2)
|
root_dev=$(cat /proc/cmdline | grep -oE 'root=[/a-z0-9]+' | cut -d '=' -f 2)
|
||||||
if [[ "$root_dev" =~ ^([/a-z0-9]+)(p[0-9])$ ]]; then # e.g. /dev/mmcblk0p2
|
if [[ "$root_dev" =~ ^([/a-z0-9]+)(p[0-9])$ ]]; then # e.g. /dev/mmcblk0p2
|
||||||
@ -20,8 +22,6 @@ msg_done "$disk_dev"
|
|||||||
|
|
||||||
test -b $data_dev && exit 0
|
test -b $data_dev && exit 0
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
start)
|
|
||||||
msg_begin "Creating data partition"
|
msg_begin "Creating data partition"
|
||||||
root_end=$(partx -s -g -o END $root_dev)
|
root_end=$(partx -s -g -o END $root_dev)
|
||||||
data_start=$(($root_end + 1))
|
data_start=$(($root_end + 1))
|
||||||
@ -68,5 +68,3 @@ case "$1" in
|
|||||||
exit 1
|
exit 1
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# always exit with a successful status
|
|
||||||
exit 0
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user