[csw-devel] SF.net SVN: gar:[6392] csw/mgar/pkg/cups/branches/cups-1.4
wahwah at users.sourceforge.net
wahwah at users.sourceforge.net
Tue Sep 22 15:47:10 CEST 2009
Revision: 6392
http://gar.svn.sourceforge.net/gar/?rev=6392&view=rev
Author: wahwah
Date: 2009-09-22 13:47:10 +0000 (Tue, 22 Sep 2009)
Log Message:
-----------
cups: A more generic preinstall script
Modified Paths:
--------------
csw/mgar/pkg/cups/branches/cups-1.4/checksums
csw/mgar/pkg/cups/branches/cups-1.4/files/CSWcupsclient.preinstall
csw/mgar/pkg/cups/branches/cups-1.4/files/CSWcupsd.preinstall
Modified: csw/mgar/pkg/cups/branches/cups-1.4/checksums
===================================================================
--- csw/mgar/pkg/cups/branches/cups-1.4/checksums 2009-09-22 13:28:49 UTC (rev 6391)
+++ csw/mgar/pkg/cups/branches/cups-1.4/checksums 2009-09-22 13:47:10 UTC (rev 6392)
@@ -1,7 +1,7 @@
1e5e54a2b503cfdeeda1b683bcccab83 download/0001-cswcups-for-service-name.patch
0da4ea6bf72d61adfc4316a738b90ab5 download/0002-Adding-the-refcount-member-to-mime_type_t.patch
a80b8543633e2f9b3b1e531ac2289306 download/0003-Reference-counting-for-printers-only.patch
-8418cf872043eada2d46c8db6e6451c0 download/CSWcupsclient.preinstall
+dec0baa8c3ec0e171183496da8f24323 download/CSWcupsclient.preinstall
ca7718998e56c320c08a77cfefe046f6 download/CSWcupsd.postremove
-8418cf872043eada2d46c8db6e6451c0 download/CSWcupsd.preinstall
+dec0baa8c3ec0e171183496da8f24323 download/CSWcupsd.preinstall
bc5e777d4320cecdd1a64de8035171a8 download/cups-1.4.0-source.tar.bz2
Modified: csw/mgar/pkg/cups/branches/cups-1.4/files/CSWcupsclient.preinstall
===================================================================
--- csw/mgar/pkg/cups/branches/cups-1.4/files/CSWcupsclient.preinstall 2009-09-22 13:28:49 UTC (rev 6391)
+++ csw/mgar/pkg/cups/branches/cups-1.4/files/CSWcupsclient.preinstall 2009-09-22 13:47:10 UTC (rev 6392)
@@ -4,31 +4,37 @@
# $Id$
#
+obsolete_directories="/opt/csw/etc/cups:/etc/opt/csw/cups"
+
obsolete_dir_information="
-This configuration directory is obsolete. Current CUPS package is using the
-/etc/opt/csw/cups directory. Files in this directory are going to be ignored.
-Please move your configuration to /etc/opt/csw/cups.
+This directory is obsolete. Files in this directory are going to be ignored.
+Please move your data to the new location.
Feel free to remove this file afterwards.
"
obsolete_dir_file_name="README.THIS_DIRECTORY_IS_OBSOLETE"
-if [ -d "${PKG_INSTALL_ROOT}/opt/csw/etc/cups" ]; then
- echo
- echo "*******************************************************************"
- echo "* The old configuration directory /opt/csw/etc/cups still exists. *"
- echo "* Please move your configuration to /etc/opt/csw/cups. *"
- echo "* *"
- echo "* Installation will continue in 10 seconds. *"
- echo "* Press CTRL+C if you want to stop now. *"
- echo "*******************************************************************"
- echo
- sleep 10
-
- # Leaving a note for the sysadmin if the they proceed with the installation.
- fn="${PKG_INSTALL_ROOT}/opt/csw/etc/cups/${obsolete_dir_file_name}"
- if touch "${fn}" 2>/dev/null; then
- echo "${obsolete_dir_information}" > "${fn}"
+for dirpair in ${obsolete_directories}; do
+ obsolete_dir=`echo ${dirpair} | cut -d: -f1`
+ new_dir=`echo ${dirpair} | cut -d: -f2`
+ if [ -d "${PKG_INSTALL_ROOT}${obsolete_dir}" ]; then
+ echo
+ echo "*******************************************************************"
+ echo "* The old configuration directory ${obsolete_dir} still exists. "
+ echo "* Please move your configuration to ${new_dir}. "
+ echo "* "
+ echo "* Installation will continue in 10 seconds. "
+ echo "* Press CTRL+C if you want to stop now. "
+ echo "*******************************************************************"
+ echo
+ sleep 10
+
+ # Leaving a note for the sysadmin if the they proceed with the installation.
+ fn="${PKG_INSTALL_ROOT}${obsolete_dir}/${obsolete_dir_file_name}"
+ if touch "${fn}" 2>/dev/null; then
+ echo "${obsolete_dir_information}" > "${fn}"
+ fi
fi
- exit 0
-fi
+done
+
+exit 0
Modified: csw/mgar/pkg/cups/branches/cups-1.4/files/CSWcupsd.preinstall
===================================================================
--- csw/mgar/pkg/cups/branches/cups-1.4/files/CSWcupsd.preinstall 2009-09-22 13:28:49 UTC (rev 6391)
+++ csw/mgar/pkg/cups/branches/cups-1.4/files/CSWcupsd.preinstall 2009-09-22 13:47:10 UTC (rev 6392)
@@ -4,31 +4,37 @@
# $Id$
#
+obsolete_directories="/opt/csw/etc/cups:/etc/opt/csw/cups"
+
obsolete_dir_information="
-This configuration directory is obsolete. Current CUPS package is using the
-/etc/opt/csw/cups directory. Files in this directory are going to be ignored.
-Please move your configuration to /etc/opt/csw/cups.
+This directory is obsolete. Files in this directory are going to be ignored.
+Please move your data to the new location.
Feel free to remove this file afterwards.
"
obsolete_dir_file_name="README.THIS_DIRECTORY_IS_OBSOLETE"
-if [ -d "${PKG_INSTALL_ROOT}/opt/csw/etc/cups" ]; then
- echo
- echo "*******************************************************************"
- echo "* The old configuration directory /opt/csw/etc/cups still exists. *"
- echo "* Please move your configuration to /etc/opt/csw/cups. *"
- echo "* *"
- echo "* Installation will continue in 10 seconds. *"
- echo "* Press CTRL+C if you want to stop now. *"
- echo "*******************************************************************"
- echo
- sleep 10
-
- # Leaving a note for the sysadmin if the they proceed with the installation.
- fn="${PKG_INSTALL_ROOT}/opt/csw/etc/cups/${obsolete_dir_file_name}"
- if touch "${fn}" 2>/dev/null; then
- echo "${obsolete_dir_information}" > "${fn}"
+for dirpair in ${obsolete_directories}; do
+ obsolete_dir=`echo ${dirpair} | cut -d: -f1`
+ new_dir=`echo ${dirpair} | cut -d: -f2`
+ if [ -d "${PKG_INSTALL_ROOT}${obsolete_dir}" ]; then
+ echo
+ echo "*******************************************************************"
+ echo "* The old configuration directory ${obsolete_dir} still exists. "
+ echo "* Please move your configuration to ${new_dir}. "
+ echo "* "
+ echo "* Installation will continue in 10 seconds. "
+ echo "* Press CTRL+C if you want to stop now. "
+ echo "*******************************************************************"
+ echo
+ sleep 10
+
+ # Leaving a note for the sysadmin if the they proceed with the installation.
+ fn="${PKG_INSTALL_ROOT}${obsolete_dir}/${obsolete_dir_file_name}"
+ if touch "${fn}" 2>/dev/null; then
+ echo "${obsolete_dir_information}" > "${fn}"
+ fi
fi
- exit 0
-fi
+done
+
+exit 0
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list