update 2022-09-07 20:24:04
This commit is contained in:
parent
1539fc2ba2
commit
b13542fc0c
|
@ -10,11 +10,11 @@ include $(TOPDIR)/rules.mk
|
|||
PKG_ARCH_LINKEASE:=$(ARCH)
|
||||
|
||||
PKG_NAME:=linkease
|
||||
PKG_VERSION:=0.9.6
|
||||
PKG_VERSION:=0.9.7
|
||||
PKG_RELEASE:=$(PKG_ARCH_LINKEASE)-1
|
||||
PKG_SOURCE:=$(PKG_NAME)-binary-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=http://fw.koolcenter.com/binary/LinkEase/LinuxStorage/
|
||||
PKG_HASH:=bc6e5a1ef908636e4a0f5f7278d017b2961624550f9cc5e7301e2963b546b3e5
|
||||
PKG_HASH:=a3accdfe3ef293fb96f153e84ea91da7911f240d1ea13a2cc1bf4bb923682f87
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-binary-$(PKG_VERSION)
|
||||
|
||||
|
|
|
@ -128,7 +128,9 @@ function store_index()
|
|||
if luci.sys.call("which docker >/dev/null 2>&1") == 0 then
|
||||
features[#features+1] = "docker"
|
||||
end
|
||||
|
||||
if luci.sys.call("[ -d /ext_overlay ] >/dev/null 2>&1") == 0 then
|
||||
features[#features+1] = "sandbox"
|
||||
end
|
||||
luci.template.render("store/main", {prefix=luci.dispatcher.build_url(unpack(page_index)),id=user_id(),lang=vue_lang(),features=features})
|
||||
end
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ PKG_ARCH_quickstart:=$(ARCH)
|
|||
|
||||
PKG_NAME:=quickstart
|
||||
PKG_VERSION:=0.5.4
|
||||
PKG_RELEASE:=2
|
||||
PKG_RELEASE:=3
|
||||
PKG_SOURCE:=$(PKG_NAME)-binary-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://fw.koolcenter.com/binary/quickstart/
|
||||
PKG_HASH:=78e69598982302e3cc1d59d1192b758b8b8d463c4bc88c6e5d0ed07242d1e9de
|
||||
|
@ -56,6 +56,7 @@ define Package/$(PKG_NAME)/install
|
|||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/quickstart.$(PKG_ARCH_quickstart) $(1)/usr/sbin/quickstart
|
||||
$(INSTALL_BIN) ./files/blockphy.sh $(1)/usr/sbin/blockphy.sh
|
||||
$(INSTALL_BIN) ./files/blockmount.sh $(1)/usr/libexec/blockmount.sh
|
||||
$(INSTALL_BIN) ./files/blockmount.init $(1)/etc/init.d/blockmount
|
||||
$(INSTALL_BIN) ./files/quickstart.init $(1)/etc/init.d/quickstart
|
||||
$(INSTALL_BIN) ./files/quickstart.uci-default $(1)/etc/uci-defaults/09-quickstart
|
||||
$(INSTALL_BIN) ./files/quickstart.hotplug $(1)/etc/hotplug.d/block/09-quickstart
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=39
|
||||
|
||||
USE_PROCD=1
|
||||
|
||||
auto_mount() {
|
||||
[ "`uci -q get fstab.@global[0].anon_mount`" = "1" ] && /usr/libexec/blockmount.sh
|
||||
return 0
|
||||
}
|
||||
|
||||
boot() {
|
||||
auto_mount
|
||||
start "$@"
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger "fstab"
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
auto_mount
|
||||
}
|
||||
|
||||
start_service() {
|
||||
return 0
|
||||
}
|
|
@ -1,5 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
DETECT=0
|
||||
|
||||
if [ -z "$ACTION" ]; then
|
||||
log() {
|
||||
echo "$*" >&2
|
||||
|
@ -39,30 +41,35 @@ handle_part() {
|
|||
[ -n "$1" ] || return 1
|
||||
|
||||
# ignore mounted device, unknown fs type, swap or raid member
|
||||
[ -n "$MOUNT" -o -z "$UUID" -o -z "$TYPE" \
|
||||
[ -z "$UUID" -o -z "$TYPE" \
|
||||
-o "$TYPE" = "swap" \
|
||||
-o "$TYPE" = "linux_raid_member" \
|
||||
] && return 0
|
||||
|
||||
local DEVICENAME="${1#/dev/}"
|
||||
local candidate="`/usr/sbin/blockphy.sh "$DEVICENAME"`"
|
||||
[ -z "$candidate" ] && return 0
|
||||
candidate="/mnt/$candidate"
|
||||
|
||||
# check if candidate mount point is busy
|
||||
mountpoint -q "$candidate" && return 0
|
||||
|
||||
# check if configured
|
||||
check_configured "$UUID" "$LABEL" "$1" "$candidate" || return 0
|
||||
|
||||
log "add mount $UUID => $candidate"
|
||||
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
add fstab mount
|
||||
set fstab.@mount[-1].uuid=$UUID
|
||||
set fstab.@mount[-1].target=$candidate
|
||||
set fstab.@mount[-1].enabled=1
|
||||
if [ "$DETECT" = "1" ]; then
|
||||
[ -z "$MOUNT" ] && return 0
|
||||
log "add mount $UUID => $MOUNT"
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
add fstab mount
|
||||
set fstab.@mount[-1].uuid=$UUID
|
||||
set fstab.@mount[-1].target=$MOUNT
|
||||
set fstab.@mount[-1].enabled=0
|
||||
EOF
|
||||
elif [ -z "$MOUNT" ]; then
|
||||
local DEVICENAME="${1#/dev/}"
|
||||
local candidate="`/usr/sbin/blockphy.sh "$DEVICENAME"`"
|
||||
[ -z "$candidate" ] && return 0
|
||||
candidate="/mnt/$candidate"
|
||||
|
||||
# check if candidate mount point is busy
|
||||
mountpoint -q "$candidate" && return 0
|
||||
|
||||
# check if configured
|
||||
check_configured "$UUID" "$LABEL" "$1" "$candidate" || return 0
|
||||
|
||||
# log "add mount $UUID => $candidate"
|
||||
mkdir -p "$candidate" && mount "$1" "$candidate"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
|
@ -74,10 +81,24 @@ scan_all() {
|
|||
done
|
||||
}
|
||||
|
||||
if [ "$1" = "detect" ]; then
|
||||
DETECT=1
|
||||
cat <<-EOF >/etc/config/fstab
|
||||
config global
|
||||
option anon_swap '0'
|
||||
option anon_mount '1'
|
||||
option auto_swap '1'
|
||||
option auto_mount '1'
|
||||
option delay_root '5'
|
||||
option check_fs '0'
|
||||
|
||||
EOF
|
||||
fi
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
config_load fstab
|
||||
|
||||
scan_all
|
||||
|
||||
uci commit fstab
|
||||
[ "$DETECT" = "1" ] && uci commit fstab
|
||||
|
|
|
@ -2,19 +2,11 @@
|
|||
|
||||
if [ "$PKG_UPGRADE" != 1 ]; then
|
||||
if [ ! -f /etc/config/fstab ]; then
|
||||
cat <<-EOF >/etc/config/fstab
|
||||
config global
|
||||
option anon_swap '0'
|
||||
option anon_mount '1'
|
||||
option auto_swap '1'
|
||||
option auto_mount '1'
|
||||
option delay_root '5'
|
||||
option check_fs '0'
|
||||
|
||||
EOF
|
||||
/usr/sbin/blockmount.sh 2>/dev/null
|
||||
/usr/libexec/blockmount.sh detect 2>/dev/null
|
||||
fi
|
||||
else
|
||||
/etc/init.d/blockmount enable
|
||||
/etc/init.d/blockmount start
|
||||
/etc/init.d/quickstart enable
|
||||
/etc/init.d/quickstart start
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue