1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
4 # T2 SDE: package/.../webmin/nodefuser.patch
5 # Copyright (C) 2004 - 2009 The T2 SDE Project
6 # Copyright (C) 1998 - 2003 ROCK Linux Project
8 # More information can be found in the files COPYING and README.
10 # This patch file is dual-licensed. It is available under the license the
11 # patched project is licensed under, as long as it is an OpenSource license
12 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
13 # of the GNU General Public License as published by the Free Software
14 # Foundation; either version 2 of the License, or (at your option) any later
16 # --- T2-COPYRIGHT-NOTE-END ---
18 diff -Nur webmin-1.490-orig/setup.sh webmin-1.490/setup.sh
19 --- webmin-1.490-orig/setup.sh 2009-12-01 20:21:51.000000000 +0000
20 +++ webmin-1.490/setup.sh 2009-12-01 20:27:38.000000000 +0000
22 echo "Webmin does not support being started at boot time on your system."
27 # Copy files to target directory
28 echo "***********************************************************************"
30 echo "Creating web server config files.."
31 cfile=$config_dir/miniserv.conf
32 echo "port=$port" >> $cfile
33 - echo "root=$wadir" >> $cfile
34 - echo "mimetypes=$wadir/mime.types" >> $cfile
35 + echo "root=/$prefix" >> $cfile
36 + echo "mimetypes=/$prefix/mime.types" >> $cfile
37 echo "addtype_cgi=internal/cgi" >> $cfile
38 echo "realm=Webmin Server" >> $cfile
39 echo "logfile=$var_dir/miniserv.log" >> $cfile
41 md5pass=`$perl -e 'print crypt("test", "\\$1\\$A9wB3O18\\$zaZgqrEmb9VNltWTL454R/") eq "\\$1\\$A9wB3O18\\$zaZgqrEmb9VNltWTL454R/" ? "1\n" : "0\n"'`
43 ufile=$config_dir/miniserv.users
44 - if [ "$crypt" != "" ]; then
45 - echo "$login:$crypt:0" > $ufile
47 - if [ "$md5pass" = "1" ]; then
48 - $perl -e 'print "$ARGV[0]:",crypt($ARGV[1], "\$1\$XXXXXXXX"),":0\n"' "$login" "$password" > $ufile
50 - $perl -e 'print "$ARGV[0]:",crypt($ARGV[1], "XX"),":0\n"' "$login" "$password" > $ufile
55 echo "userfile=$ufile" >> $cfile
58 echo "Creating access control file.."
59 afile=$config_dir/webmin.acl
61 - if [ "$defaultmods" = "" ]; then
62 - echo "$login: $allmods" >> $afile
64 - echo "$login: $defaultmods" >> $afile
71 echo "Creating start and stop scripts.."
72 rm -f $config_dir/stop $config_dir/start $config_dir/restart $config_dir/reload
73 echo "#!/bin/sh" >>$config_dir/start
74 -echo "echo Starting Webmin server in $wadir" >>$config_dir/start
75 +echo "echo Starting Webmin server in $prefix" >>$config_dir/start
76 echo "trap '' 1" >>$config_dir/start
77 echo "LANG=" >>$config_dir/start
78 echo "export LANG" >>$config_dir/start
80 echo "export PERLLIB" >>$config_dir/start
81 uname -a | grep -i 'HP/*UX' >/dev/null
83 - echo "exec '$wadir/miniserv.pl' $config_dir/miniserv.conf &" >>$config_dir/start
84 + echo "exec '/opt/webmin/miniserv.pl' $config_dir/miniserv.conf &" >>$config_dir/start
86 - echo "exec '$wadir/miniserv.pl' $config_dir/miniserv.conf" >>$config_dir/start
87 + echo "exec '/opt/webmin/miniserv.pl' $config_dir/miniserv.conf" >>$config_dir/start
90 echo "#!/bin/sh" >>$config_dir/stop
91 -echo "echo Stopping Webmin server in $wadir" >>$config_dir/stop
92 +echo "echo Stopping Webmin server in $prefix" >>$config_dir/stop
93 echo "pidfile=\`grep \"^pidfile=\" $config_dir/miniserv.conf | sed -e 's/pidfile=//g'\`" >>$config_dir/stop
94 echo "kill \`cat \$pidfile\`" >>$config_dir/stop