From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Qds2Z-0005ok-9O for garchives@archives.gentoo.org; Mon, 04 Jul 2011 22:54:55 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3422D21C105; Mon, 4 Jul 2011 22:54:47 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 0405D21C105 for ; Mon, 4 Jul 2011 22:54:46 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 7FAED1B400E for ; Mon, 4 Jul 2011 22:54:46 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id D16BD8003D for ; Mon, 4 Jul 2011 22:54:45 +0000 (UTC) From: "Christian Ruppert" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Christian Ruppert" Message-ID: <003d4ba15be5f43eb868cf89e8c8c7db46e9dc94.idl0r@gentoo> Subject: [gentoo-commits] proj/openrc:master commit in: src/rc/ X-VCS-Repository: proj/openrc X-VCS-Files: src/rc/runscript.c X-VCS-Directories: src/rc/ X-VCS-Committer: idl0r X-VCS-Committer-Name: Christian Ruppert X-VCS-Revision: 003d4ba15be5f43eb868cf89e8c8c7db46e9dc94 Date: Mon, 4 Jul 2011 22:54:45 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 94e852584c73244244bfe2e73da7dd4c commit: 003d4ba15be5f43eb868cf89e8c8c7db46e9dc94 Author: Christian Ruppert gentoo org> AuthorDate: Mon Jul 4 22:51:29 2011 +0000 Commit: Christian Ruppert gentoo org> CommitDate: Mon Jul 4 22:51:29 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/openrc.git;a=3D= commit;h=3D003d4ba1 Don't write into optarg, this also fixes a compiler warning. --- src/rc/runscript.c | 12 +++++------- 1 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/rc/runscript.c b/src/rc/runscript.c index a6a8d0e..f62e8dc 100644 --- a/src/rc/runscript.c +++ b/src/rc/runscript.c @@ -1333,12 +1333,6 @@ runscript(int argc, char **argv) prefix =3D NULL; retval =3D svc_exec("status", NULL); } else { - if (strcmp(optarg, "pause") =3D=3D 0) { - ewarn("WARNING: 'pause' is deprecated; please use '--nodeps stop'"); - deps =3D false; - optarg =3D "stop"; - } - if (strcmp(optarg, "conditionalrestart") =3D=3D 0 || strcmp(optarg, "condrestart") =3D=3D 0) { @@ -1349,7 +1343,11 @@ runscript(int argc, char **argv) svc_restart(); } else if (strcmp(optarg, "start") =3D=3D 0) { svc_start(); - } else if (strcmp(optarg, "stop") =3D=3D 0) { + } else if (strcmp(optarg, "stop") =3D=3D 0 || strcmp(optarg, "pause")= =3D=3D 0) { + if (strcmp(optarg, "pause") =3D=3D 0) { + ewarn("WARNING: 'pause' is deprecated; please use '--nodeps stop'")= ; + deps =3D false; + } if (deps && in_background) get_started_services(); svc_stop();