summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2021-01-19 13:06:18 +0100
committerKarel Kočí <cynerd@email.cz>2021-01-19 13:09:32 +0100
commit0ecd65eab91e6c796cd4a0aa5364349518cbfa19 (patch)
treeb395a5f9885a331ccdf22afcce11522fe9ecc1cf
parent0de555f16b5480efdc5de12727b5800e3e2e2b5b (diff)
downloadopenwrt-personal-pkgs-0ecd65eab91e6c796cd4a0aa5364349518cbfa19.tar.gz
openwrt-personal-pkgs-0ecd65eab91e6c796cd4a0aa5364349518cbfa19.tar.bz2
openwrt-personal-pkgs-0ecd65eab91e6c796cd4a0aa5364349518cbfa19.zip
mount-data: fixes
-rw-r--r--mount-data/Makefile4
-rwxr-xr-xmount-data/files/init12
2 files changed, 7 insertions, 9 deletions
diff --git a/mount-data/Makefile b/mount-data/Makefile
index 3af25b5..69f082b 100644
--- a/mount-data/Makefile
+++ b/mount-data/Makefile
@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=mount-data
-PKG_VERSION:=1.0.0
+PKG_VERSION:=1.0.1
PKG_MAINTAINER:=Karel Kočí <cynerd@email.cz>
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
@@ -20,7 +20,7 @@ endef
define Package/mount-data/install
$(INSTALL_DIR) $(1)/etc/init.d
- $(INSTALL_DATA) ./files/init $(1)/etc/init.d/data
+ $(INSTALL_BIN) ./files/init $(1)/etc/init.d/data
endef
Build/Compile:=:
diff --git a/mount-data/files/init b/mount-data/files/init
index 035f82f..c9706f5 100755
--- a/mount-data/files/init
+++ b/mount-data/files/init
@@ -3,8 +3,6 @@
START=36
STOP=90
-UUID_A="3472bef9-cbae-48bd-873e-fd4858a0b72f"
-UUID_B="ad73f0bf-3cc5-4aee-842f-992db6a642e3"
UUID="f71f2b6c-fc49-4a9b-91b3-7eaab853a02d"
is_open() {
@@ -12,7 +10,7 @@ is_open() {
}
open() {
- cryptsetup open --key-file /etc/keys/sd "UUID=$2" "data_$1"
+ cryptsetup open --key-file /etc/keys/sd "$2" "data_$1"
}
close() {
@@ -37,10 +35,10 @@ status() {
}
start() {
- is_open a || open a "$UUID_A"
- is_open b || open b "$UUID_B"
- is_mounted "/data" || mount @data /data
- is_mounted "/srv" || mount @srv /srv
+ is_open a || open a /dev/sda
+ is_open b || open b /dev/sdb
+ is_mounted "/data" || mount_btrfs @data /data
+ is_mounted "/srv" || mount_btrfs @srv /srv
}
stop() {