From: Dragan Dosen Date: Thu, 18 Dec 2008 18:08:15 +0000 (+0100) Subject: * Tranzicijski paket za buduci prelazak na Debian Lenny. X-Git-Tag: v1%2.3.14+2~8 X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=commitdiff_plain;h=1523c9da57f57e5e92ac9a31da41291c21c5f417;p=xinetd-cn.git * 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. --- diff --git a/debian/README.CARNet b/debian/README.CARNet index 89572a0..5d4ed33 100644 --- a/debian/README.CARNet +++ b/debian/README.CARNet @@ -8,9 +8,10 @@ daemon". 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 @@ -21,8 +22,12 @@ ukljucuje konfiguraciju iz /etc/xinetd.d/ direktorija. 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/ @@ -30,4 +35,4 @@ direktoriju. Takva konfiguracija ima prednost nad onom iz /etc/inetd.conf. - -- Dragan Dosen Thu, 25 Oct 2007 21:21:33 +0200 + -- Dragan Dosen Thu, 18 Dec 2008 18:32:35 +0100 diff --git a/debian/changelog b/debian/changelog index 305b369..bfed64f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +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 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. diff --git a/debian/control b/debian/control index c3ddda8..3e0d4de 100644 --- a/debian/control +++ b/debian/control @@ -8,7 +8,7 @@ Standards-Version: 3.6.1 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 diff --git a/debian/postinst b/debian/postinst index 8c2f033..84b2ca9 100644 --- a/debian/postinst +++ b/debian/postinst @@ -39,7 +39,12 @@ fi # 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 @@ -94,7 +99,7 @@ cp_check_and_sed "^service " \ # 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 @@ -104,35 +109,45 @@ fi # 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