chiark / gitweb /
units: skip mounting /dev/hugepages if we don't have CAP_SYS_ADMIN
authorMichal Sekletar <msekleta@redhat.com>
Wed, 12 Nov 2014 14:19:42 +0000 (15:19 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 4 Dec 2014 01:43:02 +0000 (02:43 +0100)
Preparation for allowing systemd to run gracefully in containers lacking
CAP_SYS_ADMIN.

units/dev-hugepages.mount

index d711fae..882adb4 100644 (file)
@@ -12,6 +12,7 @@ Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
 DefaultDependencies=no
 Before=sysinit.target
 ConditionPathExists=/sys/kernel/mm/hugepages
+ConditionCapability=CAP_SYS_ADMIN
 
 [Mount]
 What=hugetlbfs