[Pkg-voip-commits] r7275 - in /kamailio/trunk/debian: changelog kamailio-radius-modules.preinst kamailio.init kamailio.postinst kamailio.preinst
henningw-guest at alioth.debian.org
henningw-guest at alioth.debian.org
Tue May 26 13:47:00 UTC 2009
Author: henningw-guest
Date: Tue May 26 13:46:59 2009
New Revision: 7275
URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=7275
Log:
- fix an error in init and postinst script
- add debhelper scripts for updates
Added:
kamailio/trunk/debian/kamailio-radius-modules.preinst
kamailio/trunk/debian/kamailio.preinst
Modified:
kamailio/trunk/debian/changelog
kamailio/trunk/debian/kamailio.init
kamailio/trunk/debian/kamailio.postinst
Modified: kamailio/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-voip/kamailio/trunk/debian/changelog?rev=7275&op=diff
==============================================================================
--- kamailio/trunk/debian/changelog (original)
+++ kamailio/trunk/debian/changelog Tue May 26 13:46:59 2009
@@ -15,6 +15,7 @@
* debian/kamailio.init:
+ add example core dump directory setting to init file
+ small reformatting in init file, mostly whitespace changes
+ + fix small error in package name definition
* debian/patches/13_Makefile_radius.dpatch:
+ fix upstream change in build system, they don't install the
dictionary.radius in the normal build anymore
@@ -32,6 +33,8 @@
* debian/kamailio.dirs:
+ its not necessary to create /var/run/kamailio in the package,
adduser should do this in the postinst script
+ * debian/kamailio.preinst, debian/kamailio-radius-modules.preinst:
+ + add preinst helper scripts to help upgrade from openser
[ Julien BLACHE ]
* Pre-release from SVN.
Added: kamailio/trunk/debian/kamailio-radius-modules.preinst
URL: http://svn.debian.org/wsvn/pkg-voip/kamailio/trunk/debian/kamailio-radius-modules.preinst?rev=7275&op=file
==============================================================================
--- kamailio/trunk/debian/kamailio-radius-modules.preinst (added)
+++ kamailio/trunk/debian/kamailio-radius-modules.preinst Tue May 26 13:46:59 2009
@@ -1,0 +1,28 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+ install|upgrade)
+ # updating from an OpenSER installation
+ if dpkg --compare-versions "$2" "<" "1.4.0"; then
+ # check for old configuration
+ if [ -r /etc/openser/dictionary.radius ]; then
+ echo "Found old Radius module installation, trying to move the configuration file to new location."
+ mkdir -p /etc/kamailio
+ mv /etc/openser/dictionary.radius /etc/kamailio/dictionary.radius
+ echo "Move \"/etc/openser/dictionary.radius\" to \"/etc/kamailio/\"."
+ fi
+ fi
+ ;;
+
+ abort-upgrade)
+ ;;
+
+ *)
+ echo "preinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+#DEBHELPER#
Modified: kamailio/trunk/debian/kamailio.init
URL: http://svn.debian.org/wsvn/pkg-voip/kamailio/trunk/debian/kamailio.init?rev=7275&op=diff
==============================================================================
--- kamailio/trunk/debian/kamailio.init (original)
+++ kamailio/trunk/debian/kamailio.init Tue May 26 13:46:59 2009
@@ -15,7 +15,7 @@
PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/kamailio
NAME=kamailio
-DESC=Kamailio SIP server
+DESC="Kamailio SIP server"
HOMEDIR=/var/run/kamailio
PIDFILE=$HOMEDIR/$NAME.pid
DEFAULTS=/etc/default/kamailio
Modified: kamailio/trunk/debian/kamailio.postinst
URL: http://svn.debian.org/wsvn/pkg-voip/kamailio/trunk/debian/kamailio.postinst?rev=7275&op=diff
==============================================================================
--- kamailio/trunk/debian/kamailio.postinst (original)
+++ kamailio/trunk/debian/kamailio.postinst Tue May 26 13:46:59 2009
@@ -6,7 +6,7 @@
configure)
adduser --quiet --system --group --disabled-password \
--shell /bin/false --gecos "Kamailio SIP Server" \
- --home $HOMEDIR kamailio || true
+ --home /var/run/kamailio kamailio || true
;;
Added: kamailio/trunk/debian/kamailio.preinst
URL: http://svn.debian.org/wsvn/pkg-voip/kamailio/trunk/debian/kamailio.preinst?rev=7275&op=file
==============================================================================
--- kamailio/trunk/debian/kamailio.preinst (added)
+++ kamailio/trunk/debian/kamailio.preinst Tue May 26 13:46:59 2009
@@ -1,0 +1,37 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+ install|upgrade)
+ # updating from an OpenSER installation
+ if dpkg --compare-versions "$2" "<" "1.4.0"; then
+ # check for old configuration
+ if [ -r /etc/openser/openser.cfg ]; then
+ echo "Found old OpenSER installation, trying to move configuration files to new location."
+ mkdir -p /etc/kamailio
+ mv /etc/openser/openser.cfg /etc/kamailio/kamailio.cfg
+ echo "Moved \"/etc/openser/openser.cfg\" to \"/etc/kamailio/kamailio.cfg\"."
+ if [ -r /etc/openser/openserctlrc ]; then
+ mv /etc/openser/openserctlrc /etc/kamailio/kamctlrc
+ echo "Moved \"/etc/openser/openserctlrc\" to \"/etc/kamailio/kamctlrc\"."
+ fi
+ if [ -r /etc/default/openser ]; then
+ mv /etc/default/openser /etc/default/kamailio
+ echo "Moved \"/etc/default/openser\" to \"/etc/default/kamailio\"."
+ fi
+ echo "Please take a look at kamailio.README.debian about how to upgrade your configuration."
+ fi
+ fi
+ ;;
+
+ abort-upgrade)
+ ;;
+
+ *)
+ echo "preinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+#DEBHELPER#
More information about the Pkg-voip-commits
mailing list