Skip to content

Commit fe0b9cd

Browse files
msekletarpoettering
authored andcommitted
units: skip mounting /dev/hugepages if we don't have CAP_SYS_ADMIN
Preparation for allowing systemd to run gracefully in containers lacking CAP_SYS_ADMIN.
1 parent 6ed62be commit fe0b9cd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

units/dev-hugepages.mount

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
1212
DefaultDependencies=no
1313
Before=sysinit.target
1414
ConditionPathExists=/sys/kernel/mm/hugepages
15+
ConditionCapability=CAP_SYS_ADMIN
1516

1617
[Mount]
1718
What=hugetlbfs

0 commit comments

Comments
 (0)