From 510e3b95538e18c282bd441bfe069afc83d0051a Mon Sep 17 00:00:00 2001 From: ajacoutot <> Date: Wed, 30 Nov 2011 08:06:02 +0000 Subject: [PATCH] Fix an issue when uid != euid (e.g. when running shutdown(8) as a regular user, member of the operator group); rm(1) was waiting for interactive input to remove the runfiles which made no sense, so just use `-f'. issue spotted by weerd@ ok weerd@ robert@ --- src/etc/rc.d/rc.subr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/etc/rc.d/rc.subr b/src/etc/rc.d/rc.subr index fb14e386..ab118ae8 100644 --- a/src/etc/rc.d/rc.subr +++ b/src/etc/rc.d/rc.subr @@ -1,4 +1,4 @@ -# $OpenBSD: rc.subr,v 1.55 2011/10/15 16:05:15 halex Exp $ +# $OpenBSD: rc.subr,v 1.56 2011/11/30 08:06:02 ajacoutot Exp $ # # Copyright (c) 2010, 2011 Antoine Jacoutot # Copyright (c) 2010, 2011 Ingo Schwarze @@ -40,7 +40,7 @@ rc_read_runfile() { } rc_rm_runfile() { - [ -f ${_RC_RUNFILE} ] && rm ${_RC_RUNFILE} + [ -f ${_RC_RUNFILE} ] && rm -f ${_RC_RUNFILE} } rc_start() {