[PATCH 2/6] Add config files into debian package

Nick Andrew nick at nick-andrew.net
Mon Jun 23 07:56:08 UTC 2008


Add config files into debian package

dpkg -i perlbal.deb succeeds but emits these warnings:

cp: cannot stat `/usr/share/perlbal/perlbal.conf.default': No such file or directory
cp: cannot stat `/usr/share/perlbal/nodelist.dat.default': No such file or directory

Add the files in conf/* into the package build process. The files
will now be installed in /usr/share/doc/perlbal/examples/.

Signed-off-by: Nick Andrew <nick at nick-andrew.net>
---

 debian/perlbal.postinst |    8 ++++++--
 debian/rules            |    2 +-
 2 files changed, 7 insertions(+), 3 deletions(-)


diff --git a/debian/perlbal.postinst b/debian/perlbal.postinst
index 366b5aa..9d35fe4 100644
--- a/debian/perlbal.postinst
+++ b/debian/perlbal.postinst
@@ -3,13 +3,17 @@
 if [ ! -e /etc/perlbal/perlbal.conf ]
 	then
 		mkdir -p /etc/perlbal
-		cp /usr/share/perlbal/perlbal.conf.default /etc/perlbal/perlbal.conf
+		echo No /etc/perlbal/perlbal.conf, copying sample file
+		cp /usr/share/doc/perlbal/examples/perlbal.conf /etc/perlbal/perlbal.conf
+		echo Be sure to edit /etc/perlbal/perlbal.conf
 fi
 
 if [ ! -e /etc/perlbal/nodelist.dat ]
 	then
 		mkdir -p /etc/perlbal
-		cp /usr/share/perlbal/nodelist.dat.default /etc/perlbal/nodelist.dat
+		echo No /etc/perlbal/nodelist.dat copying sample file
+		cp /usr/share/doc/perlbal/examples/nodelist.dat /etc/perlbal/nodelist.dat
+		echo Be sure to edit /etc/perlbal/nodelist.dat
 fi
 
 #DEBHELPER#
diff --git a/debian/rules b/debian/rules
index db5200c..46e96c9 100755
--- a/debian/rules
+++ b/debian/rules
@@ -62,7 +62,7 @@ binary-indep: build install
 	dh_testroot
 #	dh_installcron
 #	dh_installmenu
-#	dh_installexamples
+	dh_installexamples
 	dh_installinit
 	dh_installdocs doc/hacking/todo.txt
 	dh_installchangelogs CHANGES



More information about the perlbal mailing list