From 41807efb1594ae8e71e0255e154ea7d17be2251a Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 13 Apr 2012 17:39:37 +0200 Subject: [PATCH] units: do binfmt magic only when /proc/sys is writable --- units/proc-sys-fs-binfmt_misc.automount | 3 ++- units/systemd-binfmt.service.in | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/units/proc-sys-fs-binfmt_misc.automount b/units/proc-sys-fs-binfmt_misc.automount index 6edd1f55..658b55dc 100644 --- a/units/proc-sys-fs-binfmt_misc.automount +++ b/units/proc-sys-fs-binfmt_misc.automount @@ -9,7 +9,8 @@ Description=Arbitrary Executable File Formats File System Automount Point DefaultDependencies=no Before=sysinit.target -ConditionPathExists=/proc/sys/fs/binfmt_misc +ConditionPathExists=/proc/sys/fs/binfmt_misc/ +ConditionPathIsReadWrite=/proc/sys/ [Automount] Where=/proc/sys/fs/binfmt_misc diff --git a/units/systemd-binfmt.service.in b/units/systemd-binfmt.service.in index 267d5c3f..8d288066 100644 --- a/units/systemd-binfmt.service.in +++ b/units/systemd-binfmt.service.in @@ -11,6 +11,7 @@ DefaultDependencies=no Conflicts=shutdown.target After=systemd-readahead-collect.service systemd-readahead-replay.service proc-sys-fs-binfmt_misc.automount Before=sysinit.target shutdown.target +ConditionPathIsReadWrite=/proc/sys/ ConditionDirectoryNotEmpty=|/usr/lib/binfmt.d ConditionDirectoryNotEmpty=|/usr/local/lib/binfmt.d ConditionDirectoryNotEmpty=|/etc/binfmt.d -- 2.39.5