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 d711faed5568b16f503edcdbec3649f7b0082c43..882adb4545ae5b1bcd7bc7fe5bd3bab286d141f1 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