INSTALACIJA:
U slucaju da je unutar /etc/default/xinetd datoteke aktivna
--inetd_compat opcija, servisi zapisani u /etc/inetd.conf datoteci
-bit ce automatski konvertirani u zasebne konfiguracijske datoteke
-unutar /etc/xinetd.d/ direktorija.
+-inetd_compat opcija ili postoji zapis 'INETD_COMPAT=Yes', servisi
+zapisani u /etc/inetd.conf datoteci bit ce automatski konvertirani
+u zasebne konfiguracijske datoteke unutar /etc/xinetd.d/
+direktorija.
Servisi koji su konfigurirani unutar konfiguracijske datoteke
/etc/xinetd.conf bit ce takodjer automatski konvertirani u
VAZNA NAPOMENA:
-Opcija -inetd_compat se vise NE koristi. Dakle, xinetd vise
-NECE citati servise konfigurirane u /etc/inetd.conf datoteci.
+Opcija -inetd_compat se vise NE koristi. Slicno vrijedi i za
+'INETD_COMPAT=Yes' zapis u /etc/default/xinetd datoteci koji
+automatski aktivira -inetd_compat opciju prilikom pokretanja
+servisa. U slucaju da je INETD_COMPAT postavljen u 'Yes', isti ce
+biti prepravljen u 'No'. Dakle, xinetd vise NECE citati servise
+konfigurirane u /etc/inetd.conf datoteci.
Ukoliko zelite dodati novi servis ili konfigurirati vec postojece,
konfiguracija se nalazi u vec spomenutom /etc/xinetd.d/
/etc/inetd.conf.
- -- Dragan Dosen <ddosen@ffzg.hr> Thu, 25 Oct 2007 21:21:33 +0200
+ -- Dragan Dosen <ddosen@ffzg.hr> Thu, 18 Dec 2008 18:32:35 +0100
+xinetd-cn (1:2.3.14-2) stable; urgency=low
+
+ * Tranzicijski paket za buduci prelazak na Debian Lenny.
+ * Deaktivacija novog 'INETD_COMPAT=Yes' zapisa unutar datoteke
+ /etc/default/xinetd - isti se postavlja u 'INETD_COMPAT=No'.
+ * Dodatne manje izmjene unutar debian/postinst datoteke.
+ * debian/control - ovisnost o xinetd (>= 1:2.3.14-7~cn1).
+ * Manje izmjene unutar README.CARNet datoteke.
+
+ -- Dragan Dosen <ddosen@ffzg.hr> Thu, 18 Dec 2008 18:26:46 +0100
+
xinetd-cn (1:2.3.14-1) stable; urgency=low
* Prva inacica paketa za Debian etch distribuciju.
Package: xinetd-cn
Architecture: all
-Depends: ${shlibs:Depends}, ${misc:Depends}, xinetd (>= 1:2.3.13-3), debianutils, coreutils (>= 5.0.91-1), carnet-tools-cn (>= 2.4)
+Depends: ${shlibs:Depends}, ${misc:Depends}, xinetd (>= 1:2.3.14-7~cn1), debianutils, coreutils (>= 5.0.91-1), carnet-tools-cn (>= 2.4)
Description: replacement for inetd with many enhancements
xinetd has access control mechanisms, extensive logging capabilities,
the ability to make services available based on time, and can place
# If there are some services enabled in /etc/inetd.conf, convert them to
# temporary xinetd configuration file.
#
-[ -f "$DEFAULT" ] && inetd_compat="`grep '^XINETD_OPTS.*=.*\-inetd_compat' "$DEFAULT"`" || true
+if [ -f "$DEFAULT" ]; then
+ inetd_compat="`egrep '^[[:space:]]*XINETD_OPTS[[:space:]]*=.*\-inetd_compat' "$DEFAULT"`" || true
+ if [ -z "$inetd_compat" ]; then
+ inetd_compat="`egrep '^[[:space:]]*INETD_COMPAT[[:space:]]*=[[:space:]]*[Yy][Ee][Ss]' "$DEFAULT"`" || true
+ fi
+fi
CONFTMP=`mktemp $CONF.tmp.XXXXXX`
if [ -f "$INETDCONF" ] && [ -n "$inetd_compat" ]; then
#
if ! egrep -q '^defaults' "$CONF"; then
- echo -e "defaults\n{\n\n}" | cp-update "$PKG" "$CONF"
+ echo -e "defaults\n{\n\n}" | cp-update -m "$PKG" "$CONF"
cp_echo "CN: Added defaults block to $CONF"
need_restart=1
#
if ! egrep -q '^includedir /etc/xinetd.d' "$CONF"; then
- echo "includedir /etc/xinetd.d" | cp-update "$PKG" "$CONF"
+ echo "includedir /etc/xinetd.d" | cp-update -m "$PKG" "$CONF"
cp_echo "CN: Added \"includedir /etc/xinetd.d\" line to $CONF"
need_restart=1
fi
-# Remove -inetd_compat option from /etc/default/xinetd
+# Remove -inetd_compat option and set INETD_COMPAT to 'No' in /etc/default/xinetd
#
if [ -f "$DEFAULT" ]; then
+ # File exists, set INETD_COMPAT to 'No'
+ cp_check_and_sed "^[[:space:]]*INETD_COMPAT.*[Yy][Ee][Ss]" \
+ "s/^[[:space:]]*INETD_COMPAT.*[Yy][Ee][Ss]/INETD_COMPAT=No/g" \
+ "$DEFAULT" && need_restart=1 || true
+
# File exists, remove -inetd_compat option
- cp_check_and_sed "^XINETD_OPTS.*\-inetd_compat" \
+ cp_check_and_sed "^[[:space:]]*XINETD_OPTS.*\-inetd_compat" \
"s/\-inetd_compat//g" \
"$DEFAULT" && need_restart=1 || true
- # Just in case there is no active XINETD_OPTS line
- if ! egrep -q '^XINETD_OPTS' "$DEFAULT"; then
+ # No INETD_COMPAT line?
+ if ! egrep -q '^[[:space:]]*INETD_COMPAT' "$DEFAULT"; then
+ echo 'INETD_COMPAT=No' | cp-update -m "$PKG" "$DEFAULT"
+ cp_echo "CN: Added 'INETD_COMPAT=No' to $DEFAULT."
+ need_restart=1
+ fi
- echo 'XINETD_OPTS="-stayalive"' | cp-update "$PKG" "$DEFAULT"
+ # Just in case there is no active XINETD_OPTS line
+ if ! egrep -q '^[[:space:]]*XINETD_OPTS' "$DEFAULT"; then
+ echo 'XINETD_OPTS="-stayalive"' | cp-update -m "$PKG" "$DEFAULT"
cp_echo "CN: Added -stayalive option to $DEFAULT."
-
need_restart=1
fi
else
# File wasn't there at all?
touch $DEFAULT
- echo 'XINETD_OPTS="-stayalive"' | cp-update "$PKG" "$DEFAULT"
- cp_echo "CN: Created $DEFAULT file with -stayalive option."
-
+ echo -e 'INETD_COMPAT=No\nXINETD_OPTS="-stayalive"' | cp-update "$PKG" "$DEFAULT"
+ cp_echo "CN: Created $DEFAULT file with -stayalive enabled and -inetd_compat disabled."
+
need_restart=1
fi