58 lines
1.6 KiB
Diff
58 lines
1.6 KiB
Diff
diff -Nru usermin-1.400/setup.sh usermin-1.400.patch/setup.sh
|
|
--- usermin-1.400/setup.sh 2009-03-18 06:34:22.000000000 +0100
|
|
+++ usermin-1.400.patch/setup.sh 2009-04-30 18:46:35.000000000 +0200
|
|
@@ -33,17 +33,6 @@
|
|
echo "systems and common Unix services to be easily administered."
|
|
echo ""
|
|
|
|
-# Only root can run this
|
|
-id | grep "uid=0(" >/dev/null
|
|
-if [ $? != "0" ]; then
|
|
- uname -a | grep -i CYGWIN >/dev/null
|
|
- if [ $? != "0" ]; then
|
|
- echo "ERROR: The Usermin install script must be run as root";
|
|
- echo "";
|
|
- exit 1;
|
|
- fi
|
|
-fi
|
|
-
|
|
# Use the supplied destination directory, if any
|
|
if [ "$1" != "" ]; then
|
|
wadir=$1
|
|
@@ -345,12 +334,6 @@
|
|
echo ""
|
|
exit 12
|
|
fi
|
|
- $perl -e 'use Socket; socket(FOO, PF_INET, SOCK_STREAM, getprotobyname("tcp")); setsockopt(FOO, SOL_SOCKET, SO_REUSEADDR, pack("l", 1)); bind(FOO, pack_sockaddr_in($ARGV[0], INADDR_ANY)) || exit(1); exit(0);' $port
|
|
- if [ $? != "0" ]; then
|
|
- echo "ERROR: TCP port $port is already in use by another program"
|
|
- echo ""
|
|
- exit 13
|
|
- fi
|
|
|
|
# Ask the user if SSL should be used
|
|
if [ "$ssl" = "" ]; then
|
|
@@ -621,22 +604,6 @@
|
|
echo ""
|
|
fi
|
|
|
|
-echo "Changing ownership and permissions .."
|
|
-chown -R root:bin $config_dir
|
|
-chmod -R 755 $config_dir
|
|
-if [ "$nochown" = "" ]; then
|
|
- chown -R root:bin "$wadir"
|
|
- chmod -R og-w "$wadir"
|
|
- if [ $var_dir != "/var" ]; then
|
|
- chown -R root:bin $var_dir
|
|
- chmod -R og-w $var_dir
|
|
- chmod -R a+rx "$wadir"
|
|
- fi
|
|
-fi
|
|
-chmod 600 $config_dir/miniserv.pem 2>/dev/null
|
|
-echo "..done"
|
|
-echo ""
|
|
-
|
|
# Save target directory if one was specified
|
|
if [ "$wadir" != "$srcdir" ]; then
|
|
echo $wadir >$config_dir/install-dir
|