istoreos: port-based mount option

This commit is contained in:
jjm2473 2022-09-15 21:09:07 +08:00
parent 2118d103f3
commit 0239690346
3 changed files with 4 additions and 5 deletions

View File

@ -1,3 +1,3 @@
if [ "$ACTION" = "add" ]; then
[ "`uci -q get fstab.@global[0].anon_mount`" = "1" ] && /usr/libexec/blockmount.sh
[ "`uci -q get fstab.@global[0].port_mount`" = "1" ] && /usr/libexec/blockmount.sh
fi

View File

@ -5,7 +5,7 @@ START=39
USE_PROCD=1
auto_mount() {
[ "`uci -q get fstab.@global[0].anon_mount`" = "1" ] && /usr/libexec/blockmount.sh
[ "`uci -q get fstab.@global[0].port_mount`" = "1" ] && /usr/libexec/blockmount.sh
return 0
}

View File

@ -88,6 +88,7 @@ if [ "$1" = "detect" ]; then
config global
option anon_swap '0'
option anon_mount '0'
option port_mount '0'
option auto_swap '1'
option auto_mount '1'
option delay_root '5'
@ -103,10 +104,8 @@ config_load fstab
scan_all
if [ "$DETECT" = "1" ]; then
uci commit fstab
sleep 2
uci -q batch <<-EOF >/dev/null
set fstab.@global[0].anon_mount=1
set fstab.@global[0].port_mount=1
commit fstab
EOF
fi