cgroupfs-mount: Added cgroup mount scripts
Signed-off-by: Gerard Ryan <G.M0N3Y.2503@gmail.com>
This commit is contained in:
parent
f2793d55fe
commit
992b2c70e6
2 changed files with 60 additions and 0 deletions
48
utils/cgroupfs-mount/Makefile
Normal file
48
utils/cgroupfs-mount/Makefile
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=cgroupfs-mount
|
||||||
|
PKG_VERSION:=1.4
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
|
PKG_SOURCE_URL:=https://codeload.github.com/tianon/cgroupfs-mount/tar.gz/${PKG_VERSION}?
|
||||||
|
PKG_HASH:=d6c8aff7af59c7d0082ee3018c97f73b0421e81a49bb28ad9f66a36da5cd6ec7
|
||||||
|
|
||||||
|
PKG_MAINTAINER:=Gerard Ryan <G.M0N3Y.2503@gmail.com>
|
||||||
|
|
||||||
|
PKG_BUILD_PARALLEL:=1
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/cgroupfs-mount/config
|
||||||
|
config CGROUPFS_MOUNT_CGROUPS
|
||||||
|
depends on PACKAGE_cgroupfs-mount
|
||||||
|
bool "Enable support for cgroups in the kernel"
|
||||||
|
default y
|
||||||
|
select KERNEL_CGROUPS
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/cgroupfs-mount
|
||||||
|
SECTION:=utils
|
||||||
|
CATEGORY:=Utilities
|
||||||
|
TITLE:=cgroup mount scripts
|
||||||
|
DEPENDS:=+mount-utils
|
||||||
|
MENU:=1
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/cgroupfs-mount/description
|
||||||
|
Simple scripts to properly mount the cgroupfs hierarchy, especially structured for Debian packaging
|
||||||
|
endef
|
||||||
|
|
||||||
|
Build/Compile=# Nothing to compile, just install the scripts
|
||||||
|
|
||||||
|
define Package/cgroupfs-mount/install
|
||||||
|
$(INSTALL_DIR) $(1)/usr/bin/
|
||||||
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/cgroupfs-mount $(1)/usr/bin/
|
||||||
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/cgroupfs-umount $(1)/usr/bin/
|
||||||
|
|
||||||
|
$(INSTALL_DIR) $(1)/etc/init.d
|
||||||
|
$(INSTALL_BIN) ./files/cgroupfs-mount.init $(1)/etc/init.d/cgroupfs-mount
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,cgroupfs-mount))
|
12
utils/cgroupfs-mount/files/cgroupfs-mount.init
Normal file
12
utils/cgroupfs-mount/files/cgroupfs-mount.init
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/sh /etc/rc.common
|
||||||
|
|
||||||
|
START=1
|
||||||
|
|
||||||
|
boot() {
|
||||||
|
# Procd mounts non-hierarchical cgroupfs so unmount first before cgroupfs-mount
|
||||||
|
if mountpoint -q /sys/fs/cgroup; then
|
||||||
|
umount /sys/fs/cgroup/
|
||||||
|
fi
|
||||||
|
|
||||||
|
cgroupfs-mount
|
||||||
|
}
|
Loading…
Reference in a new issue