summaryrefslogtreecommitdiff
path: root/sysutils/usermin/files/patch-setup.sh
diff options
context:
space:
mode:
authorJimmy Olgeni <olgeni@FreeBSD.org>2011-08-29 15:45:16 +0000
committerJimmy Olgeni <olgeni@FreeBSD.org>2011-08-29 15:45:16 +0000
commit608a8ed0381041ddf43d7727ec8fcbe3b91cf352 (patch)
tree7706577f0a60c966812bf4db1407ba4a03842827 /sysutils/usermin/files/patch-setup.sh
parent- Upgrade to 2.41. (diff)
Upgrade to version 1.480
Cleanup PREFIX handling.
Notes
Notes: svn path=/head/; revision=280702
Diffstat (limited to 'sysutils/usermin/files/patch-setup.sh')
-rw-r--r--sysutils/usermin/files/patch-setup.sh79
1 files changed, 64 insertions, 15 deletions
diff --git a/sysutils/usermin/files/patch-setup.sh b/sysutils/usermin/files/patch-setup.sh
index 4616de21cc68..056f64202ddc 100644
--- a/sysutils/usermin/files/patch-setup.sh
+++ b/sysutils/usermin/files/patch-setup.sh
@@ -1,24 +1,49 @@
$FreeBSD$
---- setup.sh.orig Fri Jun 4 01:18:07 2004
-+++ setup.sh Sat Jun 19 21:59:35 2004
-@@ -84,12 +84,12 @@
+--- setup.sh.orig
++++ setup.sh
+@@ -15,16 +15,8 @@
+ srcdir=$wadir
+ ver=`cat "$wadir/version"`
+
+-# Find temp directory
+-if [ "$tempdir" = "" ]; then
+- tempdir=$tempdir
+-fi
+-
+-if [ $? != "0" ]; then
+- echo "ERROR: Cannot find the Usermin install directory";
+- echo "";
+- exit 1;
+-fi
++tempdir=/tmp/.usermin
++mkdir -p $tempdir
+
+ echo "***********************************************************************"
+ echo "* Welcome to the Usermin setup script, version $ver *"
+@@ -84,19 +76,7 @@
echo "Unless you want to run multiple versions of Usermin at the same time"
echo "you can just accept the defaults."
echo ""
-printf "Config file directory [/etc/usermin]: "
-+printf "Config file directory [%%PREFIX%%/etc/usermin]: "
- if [ "$config_dir" = "" ]; then
- read config_dir
- fi
- if [ "$config_dir" = "" ]; then
+-if [ "$config_dir" = "" ]; then
+- read config_dir
+-fi
+-if [ "$config_dir" = "" ]; then
- config_dir=/etc/usermin
-+ config_dir=%%PREFIX%%/etc/usermin
- fi
- abspath=`echo $config_dir | grep "^/"`
- if [ "$abspath" = "" ]; then
-@@ -194,12 +194,12 @@
+-fi
+-abspath=`echo $config_dir | grep "^/"`
+-if [ "$abspath" = "" ]; then
+- echo "Config directory must be an absolute path"
+- echo ""
+- exit 2
+-fi
++config_dir=/usr/local/etc/usermin
+ if [ ! -d $config_dir ]; then
+ mkdir $config_dir;
+ if [ $? != 0 ]; then
+@@ -194,12 +174,12 @@
fi
# Ask for log directory
@@ -33,7 +58,7 @@ $FreeBSD$
fi
abspath=`echo $var_dir | grep "^/"`
if [ "$abspath" = "" ]; then
-@@ -227,7 +227,9 @@
+@@ -227,7 +207,9 @@
echo "Usermin is written entirely in Perl. Please enter the full path to the"
echo "Perl 5 interpreter on your system."
echo ""
@@ -44,7 +69,15 @@ $FreeBSD$
perldef=/usr/bin/perl
elif [ -x /usr/local/bin/perl ]; then
perldef=/usr/local/bin/perl
-@@ -465,7 +467,6 @@
+@@ -477,6 +459,7 @@
+
+ fi
+
++noperlpath="yes"
+ if [ "$noperlpath" = "" ]; then
+ echo "Inserting path to perl into scripts.."
+ (find "$wadir" -name '*.cgi' -print ; find "$wadir" -name '*.pl' -print) | $perl "$wadir/perlpath.pl" $perl -
+@@ -487,7 +470,6 @@
echo "Creating start and stop scripts.."
rm -f $config_dir/stop $config_dir/start
echo "#!/bin/sh" >>$config_dir/start
@@ -52,3 +85,19 @@ $FreeBSD$
echo "trap '' 1" >>$config_dir/start
echo "LANG=" >>$config_dir/start
echo "export LANG" >>$config_dir/start
+@@ -600,6 +582,7 @@
+ echo passdelay=1 >> $config_dir/miniserv.conf
+ fi
+
++nouninstall="yes"
+ if [ "$nouninstall" = "" ]; then
+ echo "Creating uninstall script $config_dir/uninstall.sh .."
+ cat >$config_dir/uninstall.sh <<EOF
+@@ -644,6 +627,7 @@
+ rm -f $config_dir/install-dir
+ fi
+
++nostart="yes"
+ if [ "$nostart" = "" ]; then
+ if [ "$inetd" != "1" ]; then
+ echo "Attempting to start Usermin mini web server.."