diff options
author | Wesley Shields <wxs@FreeBSD.org> | 2010-12-13 00:23:32 +0000 |
---|---|---|
committer | Wesley Shields <wxs@FreeBSD.org> | 2010-12-13 00:23:32 +0000 |
commit | f127cb65763c00f22b33d0bf87db1c7415f0e419 (patch) | |
tree | 0b0475fe559d53e3395ebc3020490d404341500b /security/sancp | |
parent | 30d550580db492319ded4334075bd760b9a0ff45 (diff) | |
download | ports-f127cb65763c00f22b33d0bf87db1c7415f0e419.tar.gz ports-f127cb65763c00f22b33d0bf87db1c7415f0e419.zip |
Notes
Diffstat (limited to 'security/sancp')
-rw-r--r-- | security/sancp/Makefile | 8 | ||||
-rw-r--r-- | security/sancp/distinfo | 1 | ||||
-rw-r--r-- | security/sancp/files/sancp.in (renamed from security/sancp/files/sancp.sh.in) | 2 | ||||
-rw-r--r-- | security/sancp/pkg-deinstall | 26 | ||||
-rw-r--r-- | security/sancp/pkg-install | 36 |
5 files changed, 8 insertions, 65 deletions
diff --git a/security/sancp/Makefile b/security/sancp/Makefile index 49e3013b1f96..2ae5f630fe08 100644 --- a/security/sancp/Makefile +++ b/security/sancp/Makefile @@ -8,7 +8,7 @@ PORTNAME= sancp PORTVERSION= 1.6.1 DISTVERSIONSUFFIX= -stable -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= security MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}-stable @@ -16,9 +16,12 @@ MAINTAINER= pauls@utdallas.edu COMMENT= A network connection profiler ALL_TARGET= bsd -USE_RC_SUBR= sancp.sh +USE_RC_SUBR= sancp SUB_FILES= pkg-message +USERS= sancp +GROUPS= sancp + PORTDOCS= CHANGES INSTALL ISSUES README \ SETUP fields.LIST LICENSE @@ -26,7 +29,6 @@ post-extract: @cd ${WRKSRC} && ${MV} LICENSE docs/ do-install: - @${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL @${INSTALL_PROGRAM} ${WRKSRC}/sancp ${PREFIX}/bin @${INSTALL_DATA} ${WRKSRC}/etc/sancp/sancp.conf ${PREFIX}/etc/sancp.conf-dist @${CP} -n ${PREFIX}/etc/sancp.conf-dist ${PREFIX}/etc/sancp.conf diff --git a/security/sancp/distinfo b/security/sancp/distinfo index 939f39c5ac0b..2447c72e5ffa 100644 --- a/security/sancp/distinfo +++ b/security/sancp/distinfo @@ -1,3 +1,2 @@ -MD5 (sancp-1.6.1-stable.tar.gz) = ffa64f2fdb49afd7ef16fbefda21e251 SHA256 (sancp-1.6.1-stable.tar.gz) = 9836262aaf02bde116a9e79d342ea3af8b4991c7ba27b816fb54ed6c0863ff48 SIZE (sancp-1.6.1-stable.tar.gz) = 71748 diff --git a/security/sancp/files/sancp.sh.in b/security/sancp/files/sancp.in index cd5c17793240..80bc18641069 100644 --- a/security/sancp/files/sancp.sh.in +++ b/security/sancp/files/sancp.in @@ -75,6 +75,6 @@ load_rc_config $name : ${sancp_conf="%%PREFIX%%/etc/sancp.conf"} : ${sancp_interface=""} -command_args="${sancp_flags} -c ${sancp_conf} -i ${sancp_interface}" +command_args="-c ${sancp_conf} -i ${sancp_interface}" run_rc_command "$1" diff --git a/security/sancp/pkg-deinstall b/security/sancp/pkg-deinstall index 212c8c38918f..96f4167cd9e0 100644 --- a/security/sancp/pkg-deinstall +++ b/security/sancp/pkg-deinstall @@ -4,28 +4,6 @@ if [ "$2" != "POST-DEINSTALL" ]; then exit 0 fi -PATH=/bin:/usr/sbin -USER=sancp -GROUP=${USER} -LOG_DIR=/var/log/sancp +PATH=/bin:/usr/bin -# Remove the log directory -if [ -d ${LOG_DIR} ]; -then - rmdir ${LOG_DIR} >/dev/null 2>&1; -fi - -if pw user show "${USER}" >/dev/null 2>&1; then - if ! pw userdel ${USER} ; - then - echo "Unable to remove user: ${USER}, remove it manually" - fi -fi - - -if pw group show "${GROUP}" >/dev/null 2>&1; then - if ! pw groupdel ${GROUP} ; - then - echo "Unable to remove group: ${GROUP}, remove it manually" - fi -fi +echo "* If you nolonger plan to run sancp delete /var/log/sancp, the user & group created during install *" diff --git a/security/sancp/pkg-install b/security/sancp/pkg-install index d6856cb2c95e..926c97d363d1 100644 --- a/security/sancp/pkg-install +++ b/security/sancp/pkg-install @@ -5,42 +5,6 @@ if [ "$2" != "POST-INSTALL" ]; then fi PATH=/bin:/usr/sbin -USER=sancp -GROUP=${USER} LOG_DIR=/var/log/sancp -if [ ! -d ${LOG_DIR} ]; then mkdir ${LOG_DIR}; fi - -if pw group show "${GROUP}" 2>/dev/null; then - echo "You already have a group \"${GROUP}\", so I will use it." -else - if pw groupadd ${GROUP}; then - echo "Added group \"${GROUP}\"." - else - echo "Adding group \"${GROUP}\" failed..." - exit 1 - fi -fi - -if pw user show "${USER}" 2>/dev/null; then - echo "You already have a user \"${USER}\", so I will use it." - if pw usermod ${USER} -d ${LOG_DIR} - then - echo "Changed home directory of \"${USER}\" to \"${LOG_DIR}\"" - else - echo "Changing home directory of \"${USER}\" to \"${LOG_DIR}\" failed..." - exit 1 - fi -else - if pw useradd ${USER} -g ${GROUP} -h - \ - -d ${LOG_DIR} -s /sbin/nologin -c "SANCP Daemon" - then - echo "Added user \"${USER}\"." - else - echo "Adding user \"${USER}\" failed..." - exit 1 - fi -fi - -chown -R ${USER}:${GROUP} ${LOG_DIR} chmod 750 ${LOG_DIR} |