Browse Source

lvm2: set cache directory to /tmp/lvm/cache

Signed-off-by: Maxim Storchak <m.storchak@gmail.com>
Maxim Storchak 10 years ago
parent
commit
b142d973db
2 changed files with 7 additions and 5 deletions
  1. 2
    2
      utils/lvm2/Makefile
  2. 5
    3
      utils/lvm2/files/lvm2.init

+ 2
- 2
utils/lvm2/Makefile View File

@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
10 10
 
11 11
 PKG_NAME:=LVM2
12 12
 PKG_VERSION:=2.02.116
13
-PKG_RELEASE:=1
13
+PKG_RELEASE:=2
14 14
 PKG_LICENSE:=GPL-2.0 LGPL-2.1
15 15
 
16 16
 PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).tgz
@@ -76,7 +76,7 @@ define Package/lvm2/install
76 76
 	$(INSTALL_DIR) $(1)/sbin
77 77
 	$(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/lvm $(1)/sbin
78 78
 	$(INSTALL_DIR) $(1)/etc/lvm
79
-	$(SED) '/^[[:space:]]*\(#\|$$$$\)/d' $(PKG_BUILD_DIR)/conf/example.conf
79
+	$(SED) '/^[[:space:]]*\(#\|$$$$\)/d; /cache_dir/s@.*@    cache_dir = "/tmp/lvm/cache"@' $(PKG_BUILD_DIR)/conf/example.conf
80 80
 	$(INSTALL_CONF) $(PKG_BUILD_DIR)/conf/example.conf $(1)/etc/lvm/lvm.conf
81 81
 	$(INSTALL_DIR) $(1)/etc/init.d
82 82
 	$(INSTALL_BIN) ./files/lvm2.init $(1)/etc/init.d/lvm2

+ 5
- 3
utils/lvm2/files/lvm2.init View File

@@ -3,10 +3,12 @@
3 3
 START=15
4 4
 
5 5
 start () {
6
-   /sbin/lvm vgscan --ignorelockingfailure --mknodes || :
7
-   /sbin/lvm vgchange -aly --ignorelockingfailure || return 2
6
+	mkdir -p /tmp/lvm/cache
7
+	/sbin/lvm vgscan --ignorelockingfailure --mknodes || :
8
+	/sbin/lvm vgchange -aly --ignorelockingfailure || return 2
8 9
 }
9 10
 
10 11
 stop () {
11
-    /sbin/lvm vgchange -aln --ignorelockingfailure || return 2
12
+	mkdir -p /tmp/lvm/cache
13
+	/sbin/lvm vgchange -aln --ignorelockingfailure || return 2
12 14
 }