mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-29 06:06:32 +00:00
datapart init script: do not do anything at stop
This commit is contained in:
parent
0c5ce8c19f
commit
5281a3dfe6
@ -2,26 +2,26 @@
|
||||
|
||||
test -n "$os_version" || source /etc/init.d/base
|
||||
|
||||
msg_begin "Detecting disk device"
|
||||
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
|
||||
case "$1" in
|
||||
start)
|
||||
msg_begin "Detecting disk device"
|
||||
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
|
||||
disk_dev=${BASH_REMATCH[1]}
|
||||
boot_dev=${disk_dev}p1
|
||||
data_dev=${disk_dev}p3
|
||||
elif [[ "$root_dev" =~ ^([/a-z0-9]+)([0-9])$ ]]; then # e.g. /dev/sdc2
|
||||
elif [[ "$root_dev" =~ ^([/a-z0-9]+)([0-9])$ ]]; then # e.g. /dev/sdc2
|
||||
disk_dev=${BASH_REMATCH[1]}
|
||||
boot_dev=${disk_dev}1
|
||||
data_dev=${disk_dev}3
|
||||
else
|
||||
else
|
||||
msg_fail "unknown ($root_dev)"
|
||||
exit 1
|
||||
fi
|
||||
msg_done "$disk_dev"
|
||||
fi
|
||||
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"
|
||||
root_end=$(partx -s -g -o END $root_dev)
|
||||
data_start=$(($root_end + 1))
|
||||
@ -68,5 +68,3 @@ case "$1" in
|
||||
exit 1
|
||||
esac
|
||||
|
||||
# always exit with a successful status
|
||||
exit 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user