default-settings: move anon_mout setting to automount
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit 0b13de9116)
This commit is contained in:
@@ -47,6 +47,9 @@ define Build/Compile
|
||||
endef
|
||||
|
||||
define Package/automount/install
|
||||
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
||||
$(INSTALL_BIN) ./files/11-anonmount $(1)/etc/uci-defaults/
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc/hotplug.d/block
|
||||
$(INSTALL_BIN) ./files/15-automount $(1)/etc/hotplug.d/block/
|
||||
endef
|
||||
|
||||
13
package/emortal/automount/files/11-anonmount
Normal file
13
package/emortal/automount/files/11-anonmount
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
if ! uci -q get system.@imm_init[0].anon_mount > "/dev/null"; then
|
||||
uci -q batch <<-EOF
|
||||
set fstab.@global[0].anon_mount="1"
|
||||
commit fstab
|
||||
|
||||
set system.@imm_init[0].anon_mount="1"
|
||||
commit system
|
||||
EOF
|
||||
fi
|
||||
|
||||
exit 0
|
||||
@@ -3,19 +3,13 @@
|
||||
uci -q get system.@imm_init[0] > "/dev/null" || uci -q add system imm_init > "/dev/null"
|
||||
|
||||
if ! uci -q get system.@imm_init[0].lang > "/dev/null"; then
|
||||
uci -q set luci.main.lang="auto"
|
||||
uci -q commit luci
|
||||
uci -q batch <<-EOF
|
||||
set luci.main.lang="auto"
|
||||
commit luci
|
||||
|
||||
uci -q set system.@imm_init[0].lang="1"
|
||||
uci -q commit system
|
||||
fi
|
||||
|
||||
if ! uci -q get system.@imm_init[0].anon_mount > "/dev/null"; then
|
||||
uci -q set fstab.@global[0].anon_mount="1"
|
||||
uci -q commit fstab
|
||||
|
||||
uci -q set system.@imm_init[0].anon_mount="1"
|
||||
uci -q commit system
|
||||
set system.@imm_init[0].lang="1"
|
||||
commit system
|
||||
EOF
|
||||
fi
|
||||
|
||||
ln -sf "/sbin/ip" "/usr/bin/ip"
|
||||
|
||||
@@ -3,13 +3,15 @@
|
||||
uci -q get system.@imm_init[0] > "/dev/null" || uci -q add system imm_init > "/dev/null"
|
||||
uci -q get system.@imm_init[0].ipv6 > "/dev/null" && exit 0
|
||||
|
||||
uci -q set dhcp.lan.ra="hybrid"
|
||||
uci -q set dhcp.lan.ndp="hybrid"
|
||||
uci -q set dhcp.lan.dhcpv6="hybrid"
|
||||
uci -q set dhcp.lan.ra_management="1"
|
||||
uci -q commit dhcp
|
||||
uci -q batch <<-EOF
|
||||
set dhcp.lan.ra="hybrid"
|
||||
set dhcp.lan.ndp="hybrid"
|
||||
set dhcp.lan.dhcpv6="hybrid"
|
||||
set dhcp.lan.ra_management="1"
|
||||
commit dhcp
|
||||
|
||||
uci -q set system.@imm_init[0].ipv6="1"
|
||||
uci -q commit system
|
||||
set system.@imm_init[0].ipv6="1"
|
||||
commit system
|
||||
EOF
|
||||
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user