Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Feb 2014 02:20:01 GMT
From:      Jason Unovitch <jason.unovitch@gmail.com>
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   Re: ports/186865: [patch] change rc.d script for security/strongswan
Message-ID:  <201402210220.s1L2K1fO001759@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/186865; it has been noted by GNATS.

From: Jason Unovitch <jason.unovitch@gmail.com>
To: robert.sevat@live.nl
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/186865: [patch] change rc.d script for security/strongswan
Date: Thu, 20 Feb 2014 21:11:01 -0500

 This is a multi-part message in MIME format.
 --------------000704040105040500000204
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 Content-Transfer-Encoding: quoted-printable
 
 Robert,
 There's actually a few things that can use some tweaking per RC lint. =20
 I've attached a fixed version of the RC script for you to try along with =
 
 a patch that fixes the first 4 of the RC lint issues.  It makes sense to =
 
 me as the one-line function results in much less clutter above but the=20
 maintainer/committer can decide on exactly what do do with that.
 
 RC Lint before:
 Checking strongswan
 ERROR:root:[0]: Order of rc file incorrect
 ERROR:root:[0]: Order of variables incorrect
 ERROR:root:[13]: Do not quote values unless necessary
 ERROR:root:[14]: rcvar is not set correctly
 ERROR:root:[27]: One-line functions discouraged; put command directly in =
 
 variable
 
 RC Lint after:
 Checking strongswan
 ERROR:root:[27]: One-line functions discouraged; put command directly in =
 
 variable
 
 Jason
 
 --------------000704040105040500000204
 Content-Type: text/plain; charset=UTF-8;
  name="strongswan"
 Content-Transfer-Encoding: quoted-printable
 Content-Disposition: attachment;
  filename="strongswan"
 
 #!/bin/sh
 # Start or stop strongswan
 # $FreeBSD: head/security/strongswan/files/strongswan.in 340872 2014-01-2=
 4 00:14:07Z mat $
 
 # PROVIDE: strongswan
 # REQUIRE: DAEMON
 # BEFORE: LOGIN
 # KEYWORD: shutdown
 
 =2E /etc/rc.subr
 
 name=3Dstrongswan
 rcvar=3Dstrongswan_enable
 
 load_rc_config $name
 
 command=3D/usr/local/sbin/ipsec
 extra_commands=3D"reload statusall"
 
 start_cmd=3D"strongswan_command start"
 stop_cmd=3D"strongswan_command stop"
 restart_cmd=3D"strongswan_command restart"
 status_cmd=3D"strongswan_command status"
 reload_cmd=3D"strongswan_command reload"
 statusall_cmd=3D"strongswan_command statusall"
 
 strongswan_command()
 {
 	$command ${rc_arg}
 }
 
 run_rc_command "$1"
 
 --------------000704040105040500000204
 Content-Type: text/x-patch;
  name="strongswan.lint.patch"
 Content-Transfer-Encoding: quoted-printable
 Content-Disposition: attachment;
  filename="strongswan.lint.patch"
 
 --- /usr/ports/security/strongswan/files/strongswan.in	2014-01-24 00:14:0=
 7.000000000 +0000
 +++ /usr/ports/security/strongswan/files/strongswan.in	2014-02-21 01:42:1=
 0.000000000 +0000
 @@ -7,15 +7,16 @@
  # BEFORE: LOGIN
  # KEYWORD: shutdown
 =20
 -command=3D"%%PREFIX%%/sbin/ipsec"
  . /etc/rc.subr
 =20
 -name=3D"strongswan"
 -rcvar=3D`set_rcvar`
 -extra_commands=3D"reload statusall"
 +name=3Dstrongswan
 +rcvar=3Dstrongswan_enable
 =20
  load_rc_config $name
 =20
 +command=3D%%PREFIX%%/sbin/ipsec
 +extra_commands=3D"reload statusall"
 +
  start_cmd=3D"strongswan_command start"
  stop_cmd=3D"strongswan_command stop"
  restart_cmd=3D"strongswan_command restart"
 @@ -23,11 +24,9 @@
  reload_cmd=3D"strongswan_command reload"
  statusall_cmd=3D"strongswan_command statusall"
 =20
 -
  strongswan_command()
  {
  	$command ${rc_arg}
  }
 =20
  run_rc_command "$1"
 -
 
 --------------000704040105040500000204--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402210220.s1L2K1fO001759>