aboutsummaryrefslogtreecommitdiffstats
path: root/www
diff options
context:
space:
mode:
authorscrappy <scrappy@FreeBSD.org>2006-04-16 00:23:50 +0800
committerscrappy <scrappy@FreeBSD.org>2006-04-16 00:23:50 +0800
commit4ef678cedbb4c3da06124e9d9a32e2c1e2374fa5 (patch)
treeedbfa1dc81432dd1fbd6551821fba5553f2798c1 /www
parent2899b20061336fe346fe998f1cbe0d0389ff3022 (diff)
downloadfreebsd-ports-gnome-4ef678cedbb4c3da06124e9d9a32e2c1e2374fa5.tar.gz
freebsd-ports-gnome-4ef678cedbb4c3da06124e9d9a32e2c1e2374fa5.tar.zst
freebsd-ports-gnome-4ef678cedbb4c3da06124e9d9a32e2c1e2374fa5.zip
After a recent discussion on freebsd-ports, I have modified the Horde
ports, so that they now do not overwrite existing configuration files. Rather than backing up the old ones and allowing the user to merge the files by hand, config files are left untouched. Submitted by: Shaun Amott <shaun@inerd.com>
Diffstat (limited to 'www')
-rw-r--r--www/horde-base/files/pkg-deinstall.in9
-rw-r--r--www/horde-base/files/pkg-install.in13
-rw-r--r--www/horde-base/files/pkg-message.in5
-rw-r--r--www/horde-passwd/files/pkg-deinstall.in10
-rw-r--r--www/horde-passwd/files/pkg-install.in23
-rw-r--r--www/horde/files/pkg-deinstall.in9
-rw-r--r--www/horde/files/pkg-install.in13
-rw-r--r--www/horde/files/pkg-message.in5
-rw-r--r--www/horde4-base/files/pkg-deinstall.in9
-rw-r--r--www/horde4-base/files/pkg-install.in13
-rw-r--r--www/horde4-base/files/pkg-message.in5
11 files changed, 53 insertions, 61 deletions
diff --git a/www/horde-base/files/pkg-deinstall.in b/www/horde-base/files/pkg-deinstall.in
index 47cbca9552a2..7f9f6649e9fa 100644
--- a/www/horde-base/files/pkg-deinstall.in
+++ b/www/horde-base/files/pkg-deinstall.in
@@ -22,13 +22,10 @@ handle_config() {
for cf in `ls %%HORDEDIR%%/config/*php`; do
diff -bBqw $cf $cf.dist >/dev/null 2>&1
case $? in
- 0) # original config file, will be deleted by pkg-plist
+ 0) # original config file, delete
+ rm -f $cf
;;
- 1) # config file has been updated, must be backuped
- cp -p $cf $cf.previous
- echo "===> Backing-up..."
- echo "---> $cf has been saved ***"
- echo "---> as $cf.previous ***"
+ 1) # config file has been updated, leave it
;;
*) # not found?
;;
diff --git a/www/horde-base/files/pkg-install.in b/www/horde-base/files/pkg-install.in
index 28db88333734..a2dc1e225389 100644
--- a/www/horde-base/files/pkg-install.in
+++ b/www/horde-base/files/pkg-install.in
@@ -102,14 +102,11 @@ case $2 in
fi
if [ -z "${PACKAGE_BUILDING}" ]; then
- # Don't reset the config to default (PR ports/88621)
-
- for cf in `ls %%HORDEDIR%%/config/*php`; do
- if [ -f $cf.previous ]; then
- mv $cf $cf.new
- echo "---> $cf not installed ***"
- echo "---> please copy from $cf.previous ***"
- echo "---> or from $cf.new ***"
+ # Copy over sample config files unless they already exist
+
+ for cf in `ls %%HORDEDIR%%/config/*.dist | sed -e 's/\.dist//g'`; do
+ if [ ! -f $cf ]; then
+ cp -p $cf.dist $cf
fi
done
fi
diff --git a/www/horde-base/files/pkg-message.in b/www/horde-base/files/pkg-message.in
index c5a0ca6935e5..3226c28ff455 100644
--- a/www/horde-base/files/pkg-message.in
+++ b/www/horde-base/files/pkg-message.in
@@ -1,9 +1,6 @@
************************************************************************
Horde has been installed in %%HORDEDIR%% with your blank
-configuration files. After a reinstallation, you have to explicitely
-merge your files %%HORDEDIR%%/config/conf.php.new
-and %%HORDEDIR%%/config/conf.php.previous
-into %%HORDEDIR%%/config/conf.php .
+configuration files.
WARNING! the first user will get logged in as an administrator!
********
diff --git a/www/horde-passwd/files/pkg-deinstall.in b/www/horde-passwd/files/pkg-deinstall.in
index 7f79726e85c1..e3d33344b298 100644
--- a/www/horde-passwd/files/pkg-deinstall.in
+++ b/www/horde-passwd/files/pkg-deinstall.in
@@ -2,7 +2,6 @@
#
# $FreeBSD$
#
-# Backup horde-passwd config files, if needed.
if [ x$2 != xDEINSTALL ]; then
exit
@@ -12,13 +11,10 @@ if [ -z "${PACKAGE_BUILDING}" ]; then
for cf in `ls %%PWDDIR%%/config/*php`; do
diff -bBqw $cf $cf.dist >/dev/null 2>&1
case $? in
- 0) # original config file, will be deleted by pkg-plist
+ 0) # original config file, delete it
+ rm -f $cf
;;
- 1) # config file has been updated, must be backuped
- cp -p $cf $cf.previous
- echo "===> Backing-up..."
- echo "---> $cf has been saved ***"
- echo "---> as $cf.previous ***"
+ 1) # config file has been updated, leave it alone
;;
*) # not found?
;;
diff --git a/www/horde-passwd/files/pkg-install.in b/www/horde-passwd/files/pkg-install.in
new file mode 100644
index 000000000000..7ada28ff461b
--- /dev/null
+++ b/www/horde-passwd/files/pkg-install.in
@@ -0,0 +1,23 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+PATH=/usr/sbin:/usr/bin:/bin ; export PATH
+
+case $2 in
+ PRE-INSTALL)
+ ;;
+
+ POST-INSTALL)
+ if [ -z "${PACKAGE_BUILDING}" ]; then
+ # Copy over sample config files unless they already exist
+
+ for cf in `ls %%PWDDIR%%/config/*.dist | sed -e 's/\.dist//g'`; do
+ if [ ! -f $cf ]; then
+ cp -p $cf.dist $cf
+ fi
+ done
+ fi
+ ;;
+esac
diff --git a/www/horde/files/pkg-deinstall.in b/www/horde/files/pkg-deinstall.in
index 47cbca9552a2..7f9f6649e9fa 100644
--- a/www/horde/files/pkg-deinstall.in
+++ b/www/horde/files/pkg-deinstall.in
@@ -22,13 +22,10 @@ handle_config() {
for cf in `ls %%HORDEDIR%%/config/*php`; do
diff -bBqw $cf $cf.dist >/dev/null 2>&1
case $? in
- 0) # original config file, will be deleted by pkg-plist
+ 0) # original config file, delete
+ rm -f $cf
;;
- 1) # config file has been updated, must be backuped
- cp -p $cf $cf.previous
- echo "===> Backing-up..."
- echo "---> $cf has been saved ***"
- echo "---> as $cf.previous ***"
+ 1) # config file has been updated, leave it
;;
*) # not found?
;;
diff --git a/www/horde/files/pkg-install.in b/www/horde/files/pkg-install.in
index 28db88333734..a2dc1e225389 100644
--- a/www/horde/files/pkg-install.in
+++ b/www/horde/files/pkg-install.in
@@ -102,14 +102,11 @@ case $2 in
fi
if [ -z "${PACKAGE_BUILDING}" ]; then
- # Don't reset the config to default (PR ports/88621)
-
- for cf in `ls %%HORDEDIR%%/config/*php`; do
- if [ -f $cf.previous ]; then
- mv $cf $cf.new
- echo "---> $cf not installed ***"
- echo "---> please copy from $cf.previous ***"
- echo "---> or from $cf.new ***"
+ # Copy over sample config files unless they already exist
+
+ for cf in `ls %%HORDEDIR%%/config/*.dist | sed -e 's/\.dist//g'`; do
+ if [ ! -f $cf ]; then
+ cp -p $cf.dist $cf
fi
done
fi
diff --git a/www/horde/files/pkg-message.in b/www/horde/files/pkg-message.in
index c5a0ca6935e5..3226c28ff455 100644
--- a/www/horde/files/pkg-message.in
+++ b/www/horde/files/pkg-message.in
@@ -1,9 +1,6 @@
************************************************************************
Horde has been installed in %%HORDEDIR%% with your blank
-configuration files. After a reinstallation, you have to explicitely
-merge your files %%HORDEDIR%%/config/conf.php.new
-and %%HORDEDIR%%/config/conf.php.previous
-into %%HORDEDIR%%/config/conf.php .
+configuration files.
WARNING! the first user will get logged in as an administrator!
********
diff --git a/www/horde4-base/files/pkg-deinstall.in b/www/horde4-base/files/pkg-deinstall.in
index 47cbca9552a2..7f9f6649e9fa 100644
--- a/www/horde4-base/files/pkg-deinstall.in
+++ b/www/horde4-base/files/pkg-deinstall.in
@@ -22,13 +22,10 @@ handle_config() {
for cf in `ls %%HORDEDIR%%/config/*php`; do
diff -bBqw $cf $cf.dist >/dev/null 2>&1
case $? in
- 0) # original config file, will be deleted by pkg-plist
+ 0) # original config file, delete
+ rm -f $cf
;;
- 1) # config file has been updated, must be backuped
- cp -p $cf $cf.previous
- echo "===> Backing-up..."
- echo "---> $cf has been saved ***"
- echo "---> as $cf.previous ***"
+ 1) # config file has been updated, leave it
;;
*) # not found?
;;
diff --git a/www/horde4-base/files/pkg-install.in b/www/horde4-base/files/pkg-install.in
index 28db88333734..a2dc1e225389 100644
--- a/www/horde4-base/files/pkg-install.in
+++ b/www/horde4-base/files/pkg-install.in
@@ -102,14 +102,11 @@ case $2 in
fi
if [ -z "${PACKAGE_BUILDING}" ]; then
- # Don't reset the config to default (PR ports/88621)
-
- for cf in `ls %%HORDEDIR%%/config/*php`; do
- if [ -f $cf.previous ]; then
- mv $cf $cf.new
- echo "---> $cf not installed ***"
- echo "---> please copy from $cf.previous ***"
- echo "---> or from $cf.new ***"
+ # Copy over sample config files unless they already exist
+
+ for cf in `ls %%HORDEDIR%%/config/*.dist | sed -e 's/\.dist//g'`; do
+ if [ ! -f $cf ]; then
+ cp -p $cf.dist $cf
fi
done
fi
diff --git a/www/horde4-base/files/pkg-message.in b/www/horde4-base/files/pkg-message.in
index c5a0ca6935e5..3226c28ff455 100644
--- a/www/horde4-base/files/pkg-message.in
+++ b/www/horde4-base/files/pkg-message.in
@@ -1,9 +1,6 @@
************************************************************************
Horde has been installed in %%HORDEDIR%% with your blank
-configuration files. After a reinstallation, you have to explicitely
-merge your files %%HORDEDIR%%/config/conf.php.new
-and %%HORDEDIR%%/config/conf.php.previous
-into %%HORDEDIR%%/config/conf.php .
+configuration files.
WARNING! the first user will get logged in as an administrator!
********