cgroupfs-mount: new package
This package consists of scripts that setup cgroups at boot without doing any cgroup management or classification of tasks into cgroups Signed-off-by: Niranjan Reddy <niranjan.reddy@rockwellcollins.com> [Thomas: - rename to cgroupfs-mount to match upstream - add proper hash, since hashes should be added for github sourced packages - fix minor typos in the init script - fix the license file information.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
parent
1f80ca3390
commit
0e1547a87c
@ -1608,6 +1608,7 @@ if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
|
||||
source "package/dcron/Config.in"
|
||||
source "package/debianutils/Config.in"
|
||||
endif
|
||||
source "package/cgroupfs-mount/Config.in"
|
||||
source "package/dsp-tools/Config.in"
|
||||
source "package/emlog/Config.in"
|
||||
source "package/ftop/Config.in"
|
||||
|
19
package/cgroupfs-mount/Config.in
Normal file
19
package/cgroupfs-mount/Config.in
Normal file
@ -0,0 +1,19 @@
|
||||
config BR2_PACKAGE_CGROUPFS_MOUNT
|
||||
bool "cgroupfs-mount"
|
||||
depends on !BR2_INIT_SYSTEMD
|
||||
help
|
||||
cgroupfs mount and umount scripts.
|
||||
|
||||
requires a Linux kernel >= 3.0 with the following options
|
||||
enabled:
|
||||
|
||||
- CONFIG_BLK_CGROUP
|
||||
- CONFIG_CGROUPS
|
||||
- CONFIG_CGROUP_CPUACCT
|
||||
- CONFIG_CGROUP_DEVICE
|
||||
- CONFIG_CGROUP_FREEZER
|
||||
- CONFIG_CGROUP_WRITEBACK
|
||||
- CONFIG_CGROUP_SCHED
|
||||
- CONFIG_CGROUP_PIDS
|
||||
|
||||
https://github.com/tianon/cgroupfs-mount
|
34
package/cgroupfs-mount/S30cgroupfs
Normal file
34
package/cgroupfs-mount/S30cgroupfs
Normal file
@ -0,0 +1,34 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Set up cgroupfs mounts.
|
||||
#
|
||||
|
||||
start() {
|
||||
printf "Mounting cgroupfs hierarchy: "
|
||||
/usr/bin/cgroupfs-mount
|
||||
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||
}
|
||||
stop() {
|
||||
printf "Unmounting cgroupfs hierarchy: "
|
||||
/usr/bin/cgroupfs-umount
|
||||
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||
}
|
||||
restart() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
restart|reload)
|
||||
restart
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
2
package/cgroupfs-mount/cgroupfs-mount.hash
Normal file
2
package/cgroupfs-mount/cgroupfs-mount.hash
Normal file
@ -0,0 +1,2 @@
|
||||
# Locally calculated
|
||||
sha256 fb32a8d9de491358d28f56ab76a56e1a611b90d5b6326910d3a69395fa539027 cgroupfs-mount-7285bf44402029394808339f69f4f293730fc2c6.tar.gz
|
23
package/cgroupfs-mount/cgroupfs-mount.mk
Normal file
23
package/cgroupfs-mount/cgroupfs-mount.mk
Normal file
@ -0,0 +1,23 @@
|
||||
################################################################################
|
||||
#
|
||||
# cgroupfs-mount
|
||||
#
|
||||
################################################################################
|
||||
|
||||
CGROUPFS_MOUNT_VERSION = 7285bf44402029394808339f69f4f293730fc2c6
|
||||
CGROUPFS_MOUNT_SITE = $(call github,tianon,cgroupfs-mount,$(CGROUPFS_MOUNT_VERSION))
|
||||
CGROUPFS_MOUNT_LICENSE = GPLv3+
|
||||
CGROUPFS_MOUNT_LICENSE_FILES = debian/copyright
|
||||
|
||||
define CGROUPFS_MOUNT_INSTALL_TARGET_CMDS
|
||||
$(INSTALL) -D -m 0755 $(@D)/cgroupfs-mount $(TARGET_DIR)/usr/bin/cgroupfs-mount
|
||||
$(INSTALL) -D -m 0755 $(@D)/cgroupfs-umount $(TARGET_DIR)/usr/bin/cgroupfs-umount
|
||||
endef
|
||||
|
||||
define CGROUPFS_MOUNT_INSTALL_INIT_SYSV
|
||||
$(INSTALL) -m 0755 -D $(CGROUPFS_MOUNT_PKGDIR)/S30cgroupfs \
|
||||
$(TARGET_DIR)/etc/init.d/S30cgroupfs
|
||||
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
Loading…
Reference in New Issue
Block a user