Update to 2010-07-R1
Approved by: makc, miwi (co-mentors, implicit)
This commit is contained in:
parent
2f096902f2
commit
4a4053ce51
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=262337
1
GIDs
1
GIDs
@ -91,6 +91,7 @@ git:*:211:
|
||||
drizzle:*:213:
|
||||
bs:*:220:
|
||||
postgrey:*:225:
|
||||
kismet:*:229:
|
||||
aprsd:*:240:
|
||||
tnc:*:241:
|
||||
prosody:*:242:
|
||||
|
10
UPDATING
10
UPDATING
@ -5,6 +5,16 @@ they are unavoidable.
|
||||
You should get into the habit of checking this file for changes each time
|
||||
you update your ports collection, before attempting any port upgrades.
|
||||
|
||||
20101003:
|
||||
AFFECTS: users of net-mgmt/kismet
|
||||
AUTHOR: bf@FreeBSD.org
|
||||
|
||||
This update includes major changes in how Kismet works and is configured.
|
||||
Clients, servers, drones, and configuration files must be updated to work
|
||||
with the new version. Map support has not yet been added.
|
||||
|
||||
See the kismet README for details.
|
||||
|
||||
20100929:
|
||||
AFFECTS: users of sysutils/zfsnap
|
||||
AUTHOR: Aldis Berjoza <aldis@bsdroot.lv>
|
||||
|
@ -6,102 +6,94 @@
|
||||
#
|
||||
|
||||
PORTNAME= kismet
|
||||
PORTVERSION= 200805.r1
|
||||
PORTREVISION= 5
|
||||
DISTVERSION= 2010-07-R1
|
||||
PORTEPOCH= 1
|
||||
CATEGORIES= net-mgmt
|
||||
MASTER_SITES= http://www.kismetwireless.net/code/
|
||||
DISTNAME= kismet-2008-05-R1
|
||||
MASTER_SITES= http://www.kismetwireless.net/code/:1 \
|
||||
http://anonsvn.wireshark.org/wireshark/trunk/:2
|
||||
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:1
|
||||
DIST_SUBDIR= ${PORTNAME}
|
||||
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
|
||||
|
||||
MAINTAINER= bf@FreeBSD.org
|
||||
COMMENT= 802.11 layer2 wireless network detector, sniffer, and IDS
|
||||
|
||||
GNU_CONFIGURE= yes
|
||||
USE_GMAKE= yes
|
||||
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include ${PTHREAD_CFLAGS}" \
|
||||
LIBS="-L${LOCALBASE}/lib ${PTHREAD_LIBS}"
|
||||
CONFIGURE_ARGS+= --enable-syspcap
|
||||
CPPFLAGS+= -I${LOCALBASE}/include
|
||||
LDFLAGS+= -L${LOCALBASE}/lib
|
||||
CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
|
||||
|
||||
OPTIONS= CURSES "libcurses interface" on \
|
||||
PANEL "libpanels interface" on \
|
||||
SETUID "Install kismet with setuid" on \
|
||||
GPSMAP "Build gpsmap utility" off \
|
||||
GMAP "Build gpsmap with Google Maps patch *UNOFFICIAL*" off
|
||||
MAN1= kismet.1 kismet_drone.1
|
||||
MAN5= kismet.conf.5 kismet_drone.conf.5
|
||||
|
||||
RUN_DEPENDS= wget:${PORTSDIR}/ftp/wget
|
||||
OPTIONS= PCRE "Build kismet with PCRE regex filters" on \
|
||||
PLUGINS "Build and install plugins" off \
|
||||
SETUID "Build kismet with privilege separation" on
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
.ifdef(WITHOUT_CURSES)
|
||||
CONFIGURE_ARGS+=--disable-curses
|
||||
.endif
|
||||
|
||||
.ifdef(WITHOUT_PANEL)
|
||||
CONFIGURE_ARGS+=--disable-panel
|
||||
.endif
|
||||
|
||||
.ifdef(WITHOUT_SETUID)
|
||||
CONFIGURE_ARGS+=--disable-setuid
|
||||
.endif
|
||||
|
||||
.ifdef(WITH_GPSMAP)
|
||||
PLIST_SUB+= GPS=""
|
||||
LIB_DEPENDS+= gmp.10:${PORTSDIR}/math/gmp \
|
||||
expat.6:${PORTSDIR}/textproc/expat2 \
|
||||
Magick++.4:${PORTSDIR}/graphics/ImageMagick
|
||||
BUILD_DEPENDS+= wget:${PORTSDIR}/ftp/wget
|
||||
MAN1= gpsmap.1
|
||||
.else
|
||||
CONFIGURE_ARGS+=--disable-gpsmap
|
||||
PLIST_SUB+= GPS="@comment "
|
||||
.endif
|
||||
|
||||
.ifdef(WITH_GMAP) && defined(WITH_GPSMAP)
|
||||
PATCH_SITES= http://www.parknation.com/gmap/files/
|
||||
PATCHFILES= gpsmap-gmap-0.1.tgz
|
||||
PLIST_SUB+= GMAP=""
|
||||
.ifndef(NOPORTDOCS)
|
||||
SUB_FILES+= pkg-message
|
||||
PORTDOCS= README manuf
|
||||
DISTFILES+= manuf:2
|
||||
IGNOREFILES= manuf
|
||||
.endif
|
||||
GMAP= gpsmap-gmap
|
||||
PORTDOCS= ${GMAP}/README.txt
|
||||
|
||||
.ifdef(WITH_PCRE)
|
||||
CONFIGURE_ARGS+=--enable-pcre
|
||||
LIB_DEPENDS+= pcre:${PORTSDIR}/devel/pcre
|
||||
.else
|
||||
PLIST_SUB+= GMAP="@comment "
|
||||
CONFIGURE_ARGS+=--disable-pcre
|
||||
.endif
|
||||
|
||||
MAN1+= kismet.1 kismet_drone.1
|
||||
MAN5= kismet.conf.5 kismet_drone.conf.5 kismet_ui.conf.5
|
||||
.ifdef(WITH_SETUID)
|
||||
KISMET_GROUP?= kismet
|
||||
CONFIGURE_ARGS+=--with-suidgroup=${KISMET_GROUP}
|
||||
INSTALL_TARGET = suidinstall
|
||||
PLIST_SUB+= SUID=""
|
||||
PKGINSTALL= ${PKGDIR}/suid_pkg-install
|
||||
PKGDEINSTALL = ${PKGDIR}/suid_pkg-deinstall
|
||||
PKGMESSAGE= ${WRKDIR}/suid_pkg-message
|
||||
SUB_FILES+= suid_pkg-message
|
||||
SUB_LIST+= KISMET_GROUP=${KISMET_GROUP}
|
||||
|
||||
PORTDOCS+= README
|
||||
pre-su-install:
|
||||
@${SETENV} PKG_PREFIX=${PREFIX} ${SH} \
|
||||
${PKGINSTALL} ${PKGNAME} PRE-INSTALL
|
||||
|
||||
post-extract:
|
||||
.ifdef(WITH_GMAP) && defined(WITH_GPSMAP)
|
||||
@${TAR} -C ${WRKSRC} -xzf ${DISTDIR}/${DIST_SUBDIR}/${PATCHFILES}
|
||||
@${PATCH} -d ${WRKSRC}/${GMAP}-0.1 --forward --quiet < ${PKGDIR}/files/${GMAP}-0.1.diff.patch
|
||||
@${PATCH} -d ${WRKSRC} --forward --quiet < ${WRKSRC}/${GMAP}-0.1/${GMAP}-0.1.diff
|
||||
.else
|
||||
INSTALL_TARGET = install
|
||||
CONFIGURE_ARGS+=--without-suidgroup
|
||||
PLIST_SUB+= SUID="@comment "
|
||||
.endif
|
||||
@${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g' \
|
||||
${WRKSRC}/configure
|
||||
|
||||
.ifdef(WITH_PLUGINS)
|
||||
ALL_TARGET= depend all-with-plugins
|
||||
INSTALL_TARGET+= plugins-install
|
||||
PLIST_SUB+= PLUGINS=""
|
||||
.else
|
||||
PLIST_SUB+= PLUGINS="@comment "
|
||||
.endif
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e "/gps=/s/true/false/" \
|
||||
-e "/ouifile=/{/wireshark/d;s|/etc|${DOCSDIR}|;}" \
|
||||
${WRKSRC}/conf/kismet.conf.in \
|
||||
${WRKSRC}/conf/kismet_drone.conf
|
||||
${REINPLACE_CMD} -e "s/plugin-/plugin-[aps]/" \
|
||||
-e "s/make/${GMAKE}/" \
|
||||
-e "s/\$$(MAKE)/${GMAKE}/" \
|
||||
${WRKSRC}/Makefile.in
|
||||
|
||||
post-install:
|
||||
.ifndef(NOPORTDOCS)
|
||||
@${MKDIR} ${DOCSDIR}
|
||||
@${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
|
||||
@${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/manuf ${DOCSDIR}
|
||||
.endif
|
||||
.ifdef(WITH_GMAP) && defined(WITH_GPSMAP)
|
||||
${MKDIR} ${DATADIR}/${GMAP}/mapfiles
|
||||
${INSTALL_DATA} ${WRKSRC}/${GMAP}-0.1/index.html ${DATADIR}/${GMAP}/index.html
|
||||
${INSTALL_DATA} ${WRKSRC}/${GMAP}-0.1/mapfiles/shadow.png ${DATADIR}/${GMAP}/mapfiles/shadow.png
|
||||
${INSTALL_DATA} ${WRKSRC}/${GMAP}-0.1/mapfiles/wep.png ${DATADIR}/${GMAP}/mapfiles/wep.png
|
||||
${INSTALL_DATA} ${WRKSRC}/${GMAP}-0.1/mapfiles/open.png ${DATADIR}/${GMAP}/mapfiles/open.png
|
||||
${INSTALL_DATA} ${WRKSRC}/${GMAP}-0.1/mapfiles/wpa.png ${DATADIR}/${GMAP}/mapfiles/wpa.png
|
||||
.ifndef(NOPORTDOCS)
|
||||
@${INSTALL_DATA} ${WRKSRC}/${GMAP}-0.1/README.txt ${DOCSDIR}/${GMAP}
|
||||
@${CAT} ${PKGMESSAGE}
|
||||
.endif
|
||||
.endif
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/extra/manuf_update.sh ${PREFIX}/bin
|
||||
${INSTALL_DATA} ${WRKSRC}/conf/kismet.conf ${PREFIX}/etc/kismet.conf.sample
|
||||
${INSTALL_DATA} ${WRKSRC}/conf/kismet_drone.conf ${PREFIX}/etc/kismet_drone.conf.sample
|
||||
${INSTALL_DATA} ${WRKSRC}/conf/kismet_ui.conf ${PREFIX}/etc/kismet_ui.conf.sample
|
||||
@${INSTALL_DATA} ${WRKSRC}/conf/kismet.conf \
|
||||
${PREFIX}/etc/kismet.conf.sample
|
||||
@${INSTALL_DATA} ${WRKSRC}/conf/kismet_drone.conf \
|
||||
${PREFIX}/etc/kismet_drone.conf.sample
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,5 +1,5 @@
|
||||
MD5 (kismet-2008-05-R1.tar.gz) = 6ee365d36354b4dee4945e67f8149294
|
||||
SHA256 (kismet-2008-05-R1.tar.gz) = a298d44f8a6ec977021cd492a720987ded81b5c4baf5f68b36f1282a23c9f7d3
|
||||
SIZE (kismet-2008-05-R1.tar.gz) = 655362
|
||||
SHA256 (gpsmap-gmap-0.1.tgz) = 66c5e9c4fed70e88d092754746014bb02071b742c23390f1ec795fd14b32317b
|
||||
SIZE (gpsmap-gmap-0.1.tgz) = 13845
|
||||
MD5 (kismet/kismet-2010-07-R1.tar.gz) = 85e59186eb529889118b5635f35cf57d
|
||||
SHA256 (kismet/kismet-2010-07-R1.tar.gz) = b1bae7a97e7a904bf620f285aa0d62ebc1fd3b54b671fbca125405036f949e80
|
||||
SIZE (kismet/kismet-2010-07-R1.tar.gz) = 896466
|
||||
MD5 (kismet/manuf) = IGNORE
|
||||
SHA256 (kismet/manuf) = IGNORE
|
||||
|
@ -1,11 +0,0 @@
|
||||
--- gpsmap-gmap-0.1.diff.orig Thu Apr 6 17:36:37 2006
|
||||
+++ gpsmap-gmap-0.1.diff Thu Apr 6 17:36:44 2006
|
||||
@@ -430,7 +430,7 @@
|
||||
" -v, --verbose Verbose output while running\n"
|
||||
" -g, --config-file <file> Alternate config file\n"
|
||||
" -o, --output <filename> Image output file\n"
|
||||
-+ " -j, --googlemaps Create a javascript file (used for gogle maps\n"
|
||||
++ " -j, --googlemaps Create a javascript file (used for google maps)\n"
|
||||
" -f, --filter <MAC list> Comma-separated list of MACs to filter\n"
|
||||
" -i, --invert-filter Invert filtering (ONLY draw filtered MACs)\n"
|
||||
" -F, --typefilter <Type list> Comma-separated list of net types to filter\n"
|
10
net-mgmt/kismet/files/patch-alertracker.cc
Normal file
10
net-mgmt/kismet/files/patch-alertracker.cc
Normal file
@ -0,0 +1,10 @@
|
||||
--- alertracker.cc.orig 2010-09-03 10:57:56.000000000 -0400
|
||||
+++ alertracker.cc 2010-09-03 11:36:42.000000000 -0400
|
||||
@@ -397,6 +397,7 @@
|
||||
&(rec->limit_burst)) < 0) {
|
||||
_MSG("Invalid alert line in config file: " + clines[x], MSGFLAG_FATAL);
|
||||
globalreg->fatal_condition = 1;
|
||||
+ delete rec;
|
||||
return -1;
|
||||
}
|
||||
|
11
net-mgmt/kismet/files/patch-plugin-autowep-Makefile
Normal file
11
net-mgmt/kismet/files/patch-plugin-autowep-Makefile
Normal file
@ -0,0 +1,11 @@
|
||||
--- plugin-autowep/Makefile.orig 2010-09-04 12:31:22.000000000 -0400
|
||||
+++ plugin-autowep/Makefile 2010-09-04 12:32:10.000000000 -0400
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
install: $(PLUGOUT)
|
||||
mkdir -p $(DESTDIR)$(prefix)/lib/kismet/
|
||||
- install -o $(INSTUSR) -g $(INSTGRP) -m 644 $^ $(DESTDIR)$(prefix)/lib/kismet/$^
|
||||
+ install -o $(INSTUSR) -g $(INSTGRP) -m 644 $(PLUGOUT) $(DESTDIR)$(prefix)/lib/kismet/$(PLUGOUT)
|
||||
|
||||
userinstall: $(PLUGOUT)
|
||||
mkdir -p ${HOME}/.kismet/plugins/
|
12
net-mgmt/kismet/files/patch-plugin-ptw-Makefile
Normal file
12
net-mgmt/kismet/files/patch-plugin-ptw-Makefile
Normal file
@ -0,0 +1,12 @@
|
||||
--- plugin-ptw/Makefile.orig 2010-05-24 19:53:16.000000000 +0200
|
||||
+++ plugin-ptw/Makefile 2010-05-24 19:53:19.000000000 +0200
|
||||
@@ -22,8 +22,7 @@
|
||||
|
||||
install: $(PLUGOUT)
|
||||
mkdir -p $(DESTDIR)$(prefix)/lib/kismet/
|
||||
-
|
||||
- install -o $(INSTUSR) -g $(INSTGRP) -m 644 $^ $(DESTDIR)$(prefix)/lib/kismet/$^
|
||||
+ install -o $(INSTUSR) -g $(INSTGRP) -m 644 $(PLUGOUT) $(DESTDIR)$(prefix)/lib/kismet/$(PLUGOUT)
|
||||
|
||||
userinstall: $(PLUGOUT)
|
||||
mkdir -p ${HOME}/.kismet/plugins/
|
10
net-mgmt/kismet/files/patch-plugin-ptw-aircrack-crypto.cc
Normal file
10
net-mgmt/kismet/files/patch-plugin-ptw-aircrack-crypto.cc
Normal file
@ -0,0 +1,10 @@
|
||||
--- plugin-ptw/aircrack-crypto.cc.orig 2010-05-24 11:40:15.000000000 +0200
|
||||
+++ plugin-ptw/aircrack-crypto.cc 2010-05-24 11:39:34.000000000 +0200
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <string.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <assert.h>
|
||||
+#include <stdint.h>
|
||||
#include "aircrack-crypto.h"
|
||||
#include "aircrack-crctable.h"
|
||||
#include "aircrack-ptw2-lib.h"
|
@ -1,10 +0,0 @@
|
||||
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=
|
||||
* NOTE:
|
||||
|
||||
You have built gpsmap with Google Maps functionality.
|
||||
This is third-party patch allows you to plot wireless networks
|
||||
using Google Maps engine. It's unsupported by Kismet authors,
|
||||
please read %%DOCSDIR%%/gpsmap-gmap/README.txt from
|
||||
step 10, or see http://www.parknation.com/gmap/
|
||||
|
||||
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=
|
6
net-mgmt/kismet/files/suid_pkg-message.in
Normal file
6
net-mgmt/kismet/files/suid_pkg-message.in
Normal file
@ -0,0 +1,6 @@
|
||||
Kismet has been installed with a setuid-root capture helper binary,
|
||||
%%LOCALBASE%%/bin/kismet_capture, which may be executed by users in the
|
||||
group %%KISMET_GROUP%%. USERS IN THIS GROUP WILL BE ABLE TO ALTER NETWORK
|
||||
INTERFACE STATES, but this is more secure than running all of Kismet
|
||||
as root. ONLY users in this group will be able to run Kismet and capture
|
||||
from physical network devices.
|
@ -1,13 +1,14 @@
|
||||
Kismet is an 802.11 layer2 wireless network detector, sniffer, and intrusion
|
||||
detection system. Kismet will work with any wireless card which supports raw
|
||||
monitoring (rfmon) mode, and can sniff 802.11b, 802.11a, and 802.11g traffic.
|
||||
detection system. Kismet will work with any wireless card which supports
|
||||
raw monitoring (rfmon) mode, and can sniff 802.11a, 802.11b, and 802.11g
|
||||
traffic.
|
||||
|
||||
Kismet identifies networks by passively collecting packets and detecting
|
||||
standard named networks, detecting (and given time, decloaking) hidden
|
||||
networks, and infering the presence of nonbeaconing networks via data traffic.
|
||||
Kismet identifies networks by passively collecting packets. In addition
|
||||
to standard networks, it can detect (and given time, decloak) hidden
|
||||
networks, and infer the presence of nonbeaconing networks via data traffic.
|
||||
|
||||
Known supported cards: Atheros, Prism2, WSP100, Drone, wtapfile, pcapfile.
|
||||
Kismet also supports the radiotap headers and should work with current FreeBSD
|
||||
systems.
|
||||
Capture sources that are known to be supported: Atheros, Prism2, WSP100,
|
||||
Drone, wtapfile, pcapfile. Kismet also supports radiotap headers and
|
||||
should work with current FreeBSD systems.
|
||||
|
||||
WWW: http://www.kismetwireless.net/
|
||||
|
@ -1,29 +1,22 @@
|
||||
bin/kismet
|
||||
%%SUID%%bin/kismet_capture
|
||||
bin/kismet_client
|
||||
bin/kismet_drone
|
||||
bin/kismet_server
|
||||
bin/manuf_update.sh
|
||||
%%GPS%%bin/gpsmap
|
||||
%%GPS%%bin/gpsmap-helper-earthamaps
|
||||
etc/ap_manuf
|
||||
etc/client_manuf
|
||||
@unexec if cmp -s %D/etc/kismet.conf %D/etc/kismet.conf.sample; then rm -f %D/etc/kismet.conf; fi
|
||||
etc/kismet.conf.sample
|
||||
@unexec if cmp -s %D/etc/kismet_drone.conf %D/etc/kismet_drone.conf.sample; then rm -f %D/etc/kismet_drone.conf; fi
|
||||
etc/kismet_drone.conf.sample
|
||||
@unexec if cmp -s %D/etc/kismet_ui.conf %D/etc/kismet_ui.conf.sample; then rm -f %D/etc/kismet_ui.conf; fi
|
||||
etc/kismet_ui.conf.sample
|
||||
%%PLUGINS%%lib/kismet/aircrack-kismet.so
|
||||
%%PLUGINS%%lib/kismet/autowep-kismet.so
|
||||
%%PLUGINS%%lib/kismet/spectool_net.so
|
||||
%%PLUGINS%%lib/kismet_client/spectools_ui.so
|
||||
%%DATADIR%%/wav/alert.wav
|
||||
%%DATADIR%%/wav/junk_traffic.wav
|
||||
%%DATADIR%%/wav/new_network.wav
|
||||
%%DATADIR%%/wav/traffic.wav
|
||||
%%GMAP%%%%DATADIR%%/gpsmap-gmap/README.txt
|
||||
%%GMAP%%%%DATADIR%%/gpsmap-gmap/index.html
|
||||
%%GMAP%%%%DATADIR%%/gpsmap-gmap/mapfiles/open.png
|
||||
%%GMAP%%%%DATADIR%%/gpsmap-gmap/mapfiles/shadow.png
|
||||
%%GMAP%%%%DATADIR%%/gpsmap-gmap/mapfiles/wep.png
|
||||
%%GMAP%%%%DATADIR%%/gpsmap-gmap/mapfiles/wpa.png
|
||||
%%GMAP%%@dirrm %%DATADIR%%/gpsmap-gmap/mapfiles
|
||||
%%GMAP%%@dirrm %%DATADIR%%/gpsmap-gmap
|
||||
%%DATADIR%%/wav/gpslock.wav
|
||||
%%DATADIR%%/wav/gpslost.wav
|
||||
%%DATADIR%%/wav/new.wav
|
||||
%%DATADIR%%/wav/packet.wav
|
||||
@dirrm %%DATADIR%%/wav
|
||||
@dirrm %%DATADIR%%
|
||||
%%PLUGINS%%@dirrm lib/kismet
|
||||
%%PLUGINS%%@dirrm lib/kismet_client
|
||||
|
51
net-mgmt/kismet/suid_pkg-deinstall
Normal file
51
net-mgmt/kismet/suid_pkg-deinstall
Normal file
@ -0,0 +1,51 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# taken from net/cvsup-mirror
|
||||
|
||||
PATH=/bin:/usr/sbin
|
||||
KISMET_GROUP=${KISMET_GROUP:-kismet}
|
||||
|
||||
ask() {
|
||||
local question default answer
|
||||
|
||||
question=$1
|
||||
default=$2
|
||||
if [ -z "${PACKAGE_BUILDING}" -a -z "${BATCH}" ]; then
|
||||
read -p "${question} [${default}]? " answer
|
||||
fi
|
||||
if [ x${answer} = x ]; then
|
||||
answer=${default}
|
||||
fi
|
||||
echo ${answer}
|
||||
}
|
||||
|
||||
yesno() {
|
||||
local dflt question answer
|
||||
|
||||
question=$1
|
||||
dflt=$2
|
||||
while :; do
|
||||
answer=$(ask "${question}" "${dflt}")
|
||||
case "${answer}" in
|
||||
[Yy]*) return 0;;
|
||||
[Nn]*) return 1;;
|
||||
esac
|
||||
echo "Please answer yes or no."
|
||||
done
|
||||
}
|
||||
|
||||
delete_group() {
|
||||
local g
|
||||
|
||||
g=$1
|
||||
if yesno "Do you want me to remove group \"${g}\"" y; then
|
||||
pw groupdel -n ${g}
|
||||
echo "Done."
|
||||
fi
|
||||
}
|
||||
|
||||
if [ x$2 != xDEINSTALL ]; then
|
||||
exit
|
||||
fi
|
||||
|
||||
delete_group ${KISMET_GROUP}
|
22
net-mgmt/kismet/suid_pkg-install
Normal file
22
net-mgmt/kismet/suid_pkg-install
Normal file
@ -0,0 +1,22 @@
|
||||
#! /bin/sh
|
||||
|
||||
PATH=/bin:/usr/sbin
|
||||
KISMET_GROUP=${KISMET_GROUP:-kismet}
|
||||
KISMET_GID=${KISMET_GID:-229}
|
||||
|
||||
case $2 in
|
||||
PRE-INSTALL)
|
||||
|
||||
if pw group show "${KISMET_GROUP}" 2>/dev/null; then
|
||||
echo "You already have a group \"${KISMET_GROUP}\", so I will use it."
|
||||
else
|
||||
if pw groupadd ${KISMET_GROUP} -g ${KISMET_GID}; then
|
||||
echo "Added group \"${KISMET_GROUP}\"."
|
||||
else
|
||||
echo "Adding group \"${KISMET_GROUP}\" failed..."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
;;
|
||||
esac
|
Loading…
Reference in New Issue
Block a user