Advertisement
ponce

cgmanager rc changes

Sep 23rd, 2015
318
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.03 KB | None | 0 0
  1. --- rc.S.orig 2015-08-07 01:24:14.000000000 +0200
  2. +++ rc.S 2015-09-23 09:44:44.616457549 +0200
  3. @@ -48,31 +48,6 @@
  4. fi
  5. fi
  6.  
  7. -# Mount Control Groups filesystem interface:
  8. -if grep -wq cgroup /proc/filesystems ; then
  9. - if [ -d /sys/fs/cgroup ]; then
  10. - # See linux-*/Documentation/cgroups/cgroups.txt (section 1.6)
  11. - # Check if we have some tools to autodetect the available cgroup controllers
  12. - if [ -x /usr/bin/lssubsys -a -x /usr/bin/tr -a -x /usr/bin/sed ]; then
  13. - # Mount a tmpfs as the cgroup filesystem root
  14. - mount -t tmpfs -o mode=0755 cgroup_root /sys/fs/cgroup
  15. - # Autodetect available controllers and mount them in subfolders
  16. - controllers="$(lssubsys -a 2>/dev/null | tr '\n' ' ' | sed s/.$//)"
  17. - for i in $controllers; do
  18. - mkdir /sys/fs/cgroup/$i
  19. - mount -t cgroup -o $i $i /sys/fs/cgroup/$i
  20. - done
  21. - unset i controllers
  22. - else
  23. - # We can't use autodetection so fall back mounting them all together
  24. - mount -t cgroup cgroup /sys/fs/cgroup
  25. - fi
  26. - else
  27. - mkdir -p /dev/cgroup
  28. - mount -t cgroup cgroup /dev/cgroup
  29. - fi
  30. -fi
  31. -
  32. # Initialize the Logical Volume Manager.
  33. # This won't start unless we find /etc/lvmtab (LVM1) or
  34. # /etc/lvm/backup/ (LVM2). This is created by /sbin/vgscan, so to
  35. @@ -308,6 +283,35 @@
  36. /sbin/mount -f sysfs /sys -t sysfs
  37. fi
  38.  
  39. +# Mount Control Groups filesystem interface:
  40. +if grep -wq cgroup /proc/filesystems ; then
  41. + if [ -d /sys/fs/cgroup ]; then
  42. + # See linux-*/Documentation/cgroups/cgroups.txt (section 1.6)
  43. + # Check if we have some tools to autodetect the available cgroup controllers
  44. + if [ -x /usr/bin/lssubsys -a -x /usr/bin/tr -a -x /usr/bin/sed ]; then
  45. + # Mount a tmpfs as the cgroup filesystem root
  46. + mount -t tmpfs -o mode=0755 cgroup_root /sys/fs/cgroup
  47. + # Autodetect available controllers and mount them in subfolders
  48. + controllers="$(lssubsys -a 2>/dev/null | tr '\n' ' ' | sed s/.$//)"
  49. + for i in $controllers; do
  50. + mkdir /sys/fs/cgroup/$i
  51. + mount -t cgroup -o $i $i /sys/fs/cgroup/$i
  52. + done
  53. + unset i controllers
  54. + else
  55. + # We can't use autodetection so fall back mounting them all together
  56. + mount -t cgroup cgroup /sys/fs/cgroup
  57. + fi
  58. + # Start cgmanager
  59. + if [ -x /etc/rc.d/rc.cgmanager ]; then
  60. + . /etc/rc.d/rc.cgmanager start
  61. + fi
  62. + else
  63. + mkdir -p /dev/cgroup
  64. + mount -t cgroup cgroup /dev/cgroup
  65. + fi
  66. +fi
  67. +
  68. # Configure ISA Plug-and-Play devices:
  69. if [ -r /etc/isapnp.conf ]; then
  70. if [ -x /sbin/isapnp ]; then
  71. --- rc.6.orig 2015-03-09 20:17:49.000000000 +0100
  72. +++ rc.6 2015-09-23 10:25:11.817113365 +0200
  73. @@ -224,6 +224,11 @@
  74. /sbin/swapoff -a
  75. /bin/sync
  76.  
  77. +# Stop cgmanager
  78. +if [ -x /etc/rc.d/rc.cgmanager ]; then
  79. + . /etc/rc.d/rc.cgmanager stop
  80. +fi
  81. +
  82. echo "Unmounting local file systems:"
  83. /bin/umount -v -a -t no,proc,sysfs | tr -d ' ' | grep successfully | sed "s/:successfullyunmounted/ has been successfully unmounted./g" 2> /dev/null
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement