* updated ktp-text-ui (21.12.1 -> 21.12.2), untested
[t2-trunk.git] / package / network / webmin / nodefuser.patch
blobe5401c3ecbc53d671c3d27af1a3b844b7a4c988e
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
3 #
4 # T2 SDE: package/.../webmin/nodefuser.patch
5 # Copyright (C) 2004 - 2009 The T2 SDE Project
6 # Copyright (C) 1998 - 2003 ROCK Linux Project
7 #
8 # More information can be found in the files COPYING and README.
9 #
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
15 # version.
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
21 @@ -452,7 +452,6 @@
22 echo "Webmin does not support being started at boot time on your system."
25 - makeboot=$atboot
27 # Copy files to target directory
28 echo "***********************************************************************"
29 @@ -469,8 +468,8 @@
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
40 @@ -514,15 +513,7 @@
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
46 - else
47 - if [ "$md5pass" = "1" ]; then
48 - $perl -e 'print "$ARGV[0]:",crypt($ARGV[1], "\$1\$XXXXXXXX"),":0\n"' "$login" "$password" > $ufile
49 - else
50 - $perl -e 'print "$ARGV[0]:",crypt($ARGV[1], "XX"),":0\n"' "$login" "$password" > $ufile
51 - fi
52 - fi
53 + touch $ufile
54 chmod 600 $ufile
55 echo "userfile=$ufile" >> $cfile
57 @@ -559,11 +550,7 @@
58 echo "Creating access control file.."
59 afile=$config_dir/webmin.acl
60 rm -f $afile
61 - if [ "$defaultmods" = "" ]; then
62 - echo "$login: $allmods" >> $afile
63 - else
64 - echo "$login: $defaultmods" >> $afile
65 - fi
66 + touch $afile
67 chmod 600 $afile
68 echo "..done"
69 echo ""
70 @@ -584,7 +571,7 @@
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
79 @@ -595,13 +582,13 @@
80 echo "export PERLLIB" >>$config_dir/start
81 uname -a | grep -i 'HP/*UX' >/dev/null
82 if [ $? = "0" ]; then
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
85 else
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