From b142d973dbf1fc8d9b78246dd48c4910e036cf26 Mon Sep 17 00:00:00 2001 From: Maxim Storchak Date: Sat, 14 Feb 2015 10:36:56 +0200 Subject: [PATCH] lvm2: set cache directory to /tmp/lvm/cache Signed-off-by: Maxim Storchak --- utils/lvm2/Makefile | 4 ++-- utils/lvm2/files/lvm2.init | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/utils/lvm2/Makefile b/utils/lvm2/Makefile index 935f213f3..803a279fd 100644 --- a/utils/lvm2/Makefile +++ b/utils/lvm2/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=LVM2 PKG_VERSION:=2.02.116 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_LICENSE:=GPL-2.0 LGPL-2.1 PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).tgz @@ -76,7 +76,7 @@ define Package/lvm2/install $(INSTALL_DIR) $(1)/sbin $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/lvm $(1)/sbin $(INSTALL_DIR) $(1)/etc/lvm - $(SED) '/^[[:space:]]*\(#\|$$$$\)/d' $(PKG_BUILD_DIR)/conf/example.conf + $(SED) '/^[[:space:]]*\(#\|$$$$\)/d; /cache_dir/s@.*@ cache_dir = "/tmp/lvm/cache"@' $(PKG_BUILD_DIR)/conf/example.conf $(INSTALL_CONF) $(PKG_BUILD_DIR)/conf/example.conf $(1)/etc/lvm/lvm.conf $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_BIN) ./files/lvm2.init $(1)/etc/init.d/lvm2 diff --git a/utils/lvm2/files/lvm2.init b/utils/lvm2/files/lvm2.init index 3b542d023..4faf5d5da 100644 --- a/utils/lvm2/files/lvm2.init +++ b/utils/lvm2/files/lvm2.init @@ -3,10 +3,12 @@ START=15 start () { - /sbin/lvm vgscan --ignorelockingfailure --mknodes || : - /sbin/lvm vgchange -aly --ignorelockingfailure || return 2 + mkdir -p /tmp/lvm/cache + /sbin/lvm vgscan --ignorelockingfailure --mknodes || : + /sbin/lvm vgchange -aly --ignorelockingfailure || return 2 } stop () { - /sbin/lvm vgchange -aln --ignorelockingfailure || return 2 + mkdir -p /tmp/lvm/cache + /sbin/lvm vgchange -aln --ignorelockingfailure || return 2 }