aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-07-17 08:26:50 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-07-17 08:26:50 +0000
commit7044886c8c029202054492c65a1a83b485a40223 (patch)
treeaec19b011a17154444ec335ff4b33284c0d88aa6
parent44ba9d1bbc586d511dcfcd8db16be43d464c66b2 (diff)
downloadaports-7044886c8c029202054492c65a1a83b485a40223.tar.bz2
aports-7044886c8c029202054492c65a1a83b485a40223.tar.xz
extra/dhcp: upgrade to 4.1.0_p1. rename init.d script to dhcpd
partly fixes #64
-rw-r--r--extra/dhcp/APKBUILD33
-rw-r--r--extra/dhcp/dhcp.post-upgrade18
-rw-r--r--extra/dhcp/dhcp.pre-upgrade8
-rw-r--r--extra/dhcp/dhcpd.confd (renamed from extra/dhcp/dhcp.confd)0
-rw-r--r--extra/dhcp/dhcpd.initd (renamed from extra/dhcp/dhcp.initd)0
5 files changed, 44 insertions, 15 deletions
diff --git a/extra/dhcp/APKBUILD b/extra/dhcp/APKBUILD
index f3d4ec271c..01bb25e91d 100644
--- a/extra/dhcp/APKBUILD
+++ b/extra/dhcp/APKBUILD
@@ -1,21 +1,22 @@
-# Contributor:
-# Maintainer:
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=dhcp
-pkgver=4.1.0
+pkgver=4.1.0_p1
+_realver=4.1.0p1
pkgrel=0
pkgdesc="ISC Dynamic Host Configuration Protocol (DHCP)"
url="https://www.isc.org/"
license="GPL"
-depends="uclibc"
-makedepends=""
-install=
+depends=
+makedepends=
+install="dhcp.pre-upgrade dhcp.post-upgrade"
subpackages="$pkgname-doc $pkgname-dev"
-source="http://ftp.isc.org/isc/dhcp/$pkgname-$pkgver.tar.gz
- dhcp.confd
- dhcp.initd"
+source="http://ftp.isc.org/isc/dhcp/$pkgname-$_realver.tar.gz
+ $install
+ dhcpd.confd
+ dhcpd.initd"
build() {
- cd "$srcdir/$pkgname-$pkgver"
+ cd "$srcdir/$pkgname-$_realver"
./configure --prefix=/usr \
--sysconfdir=/etc \
@@ -24,10 +25,12 @@ build() {
make || return 1
make DESTDIR="$pkgdir" install
- install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
- install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
+ install -m755 -D "$srcdir"/dhcpd.initd "$pkgdir"/etc/init.d/dhcpd
+ install -m644 -D "$srcdir"/dhcpd.confd "$pkgdir"/etc/conf.d/dhcpd
}
-md5sums="1fffed2e8c3d67b111316d6a9b33db7a dhcp-4.1.0.tar.gz
-df32707f5bbe5363306420b5dc6e6b40 dhcp.confd
-5df9a87539bedc98a1cbc7e38b290928 dhcp.initd"
+md5sums="325ff8338c5a21f89d5304ac13ffebdf dhcp-4.1.0p1.tar.gz
+6cc49497f3c30ccd37fc7c032f7810c6 dhcp.pre-upgrade
+a7b81948ceab73dd10de275ebc00e7eb dhcp.post-upgrade
+df32707f5bbe5363306420b5dc6e6b40 dhcpd.confd
+5df9a87539bedc98a1cbc7e38b290928 dhcpd.initd"
diff --git a/extra/dhcp/dhcp.post-upgrade b/extra/dhcp/dhcp.post-upgrade
new file mode 100644
index 0000000000..b16fea6b4a
--- /dev/null
+++ b/extra/dhcp/dhcp.post-upgrade
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+# we have renamed dhcp to dhcpd. Try cleanup for users
+
+moved=
+for i in /etc/runlevel/*/dhcp; do
+ if [ -L "$i" ]; then
+ mv ${i} ${i}d
+ moved=1
+ fi
+done
+
+if [ -n "$moved" ]; then
+ echo " *"
+ echo " * NOTICE: the /etc/init.d/dhcp script have been renamed to /etc/init.d/dhcpd"
+ echo " *"
+fi
+
diff --git a/extra/dhcp/dhcp.pre-upgrade b/extra/dhcp/dhcp.pre-upgrade
new file mode 100644
index 0000000000..090f654b9a
--- /dev/null
+++ b/extra/dhcp/dhcp.pre-upgrade
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+# script renamed. Try save users settings if needed
+
+if [ -f /etc/conf.d/dhcp ] && [ ! -f /etc/conf.d/dhcpd ]; then
+ mv /etc/conf.d/dhcp /etc/conf.d/dhcpd
+fi
+
diff --git a/extra/dhcp/dhcp.confd b/extra/dhcp/dhcpd.confd
index df09ec7082..df09ec7082 100644
--- a/extra/dhcp/dhcp.confd
+++ b/extra/dhcp/dhcpd.confd
diff --git a/extra/dhcp/dhcp.initd b/extra/dhcp/dhcpd.initd
index cc9727fc7c..cc9727fc7c 100644
--- a/extra/dhcp/dhcp.initd
+++ b/extra/dhcp/dhcpd.initd