Initial Commit
- initial default booting image
This commit is contained in:
10
package/cgroupfs-v2-mount/Config.in
Normal file
10
package/cgroupfs-v2-mount/Config.in
Normal file
@@ -0,0 +1,10 @@
|
||||
config BR2_PACKAGE_CGROUPFS_V2_MOUNT
|
||||
bool "cgroupfs-v2-mount"
|
||||
depends on !BR2_INIT_SYSTEMD
|
||||
depends on !BR2_PACKAGE_CGROUPFS_MOUNT
|
||||
help
|
||||
Mount the cgroup v2 hierarchy filesystem.
|
||||
|
||||
comment "cgroupfs-v2-mount is incompatible with cgroupfs-mount"
|
||||
depends on !BR2_INIT_SYSTEMD
|
||||
depends on BR2_PACKAGE_CGROUPFS_MOUNT
|
||||
44
package/cgroupfs-v2-mount/S30cgroupfs2
Normal file
44
package/cgroupfs-v2-mount/S30cgroupfs2
Normal file
@@ -0,0 +1,44 @@
|
||||
#!/bin/sh
|
||||
|
||||
DAEMON=cgroupfs2
|
||||
|
||||
start() {
|
||||
printf 'Mounting %s: ' "${DAEMON}"
|
||||
mkdir -p /sys/fs/cgroup
|
||||
mount -t cgroup2 none /sys/fs/cgroup
|
||||
status=$?
|
||||
if [ "$status" -eq 0 ]; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "FAIL"
|
||||
fi
|
||||
return "$status"
|
||||
}
|
||||
|
||||
stop() {
|
||||
printf 'Unmounting %s: ' "${DAEMON}"
|
||||
umount /sys/fs/cgroup
|
||||
status=$?
|
||||
if [ "$status" -eq 0 ]; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "FAIL"
|
||||
fi
|
||||
return "$status"
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start|stop|restart)
|
||||
"$1";;
|
||||
reload)
|
||||
# Restart, since there is no true "reload" feature.
|
||||
restart;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|reload}"
|
||||
exit 1
|
||||
esac
|
||||
20
package/cgroupfs-v2-mount/cgroupfs-v2-mount.mk
Normal file
20
package/cgroupfs-v2-mount/cgroupfs-v2-mount.mk
Normal file
@@ -0,0 +1,20 @@
|
||||
################################################################################
|
||||
#
|
||||
# cgroupfs-v2-mount
|
||||
#
|
||||
################################################################################
|
||||
|
||||
CGROUPFS_V2_MOUNT_VERSION =
|
||||
CGROUPFS_V2_MOUNT_SITE =
|
||||
|
||||
define CGROUPFS_V2_MOUNT_LINUX_CONFIG_FIXUPS
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_CGROUPS)
|
||||
endef
|
||||
|
||||
define CGROUPFS_V2_MOUNT_INSTALL_INIT_SYSV
|
||||
$(INSTALL) -m 0755 -D \
|
||||
$(CGROUPFS_V2_MOUNT_PKGDIR)/S30cgroupfs2 \
|
||||
$(TARGET_DIR)/etc/init.d/S30cgroupfs2
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
Reference in New Issue
Block a user