This file is indexed.

/usr/lib/wims/bin/update is in wims 1:4.07d~dfsg1-1ubuntu2.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
#! /bin/sh

cd `dirname $0`
## do not seem no more useful, except for updating very old versions of wims
### should be commented
./classupdate
cd ..
wimshome=`pwd`

if [ -z "$1" ]; then wimshome2=$wimshome; else wimshome2=$1; fi

if [ ! -e s2 ]; then
 if [ -f /cdrom/knowims-hd-install ]; then
  mkdir -p -m og-rwx /ramdisk/s2
  ln -s /ramdisk/s2 .
 else
  mkdir -m og-rwx s2
 fi
fi

for d in public_html/modules public_html/modules/devel public_html/modules/local \
	public_html/bases public_html/bases/doc other log/classes \
	public_html/modules/adm/local
do
 mkdir -p $d
 echo $wimshome2 >$d/.wimshome 2>/dev/null
done
rm -fr public_html/modules/adm/coqw* 2>/dev/null

#########################

VERSION=357

v=`cat log/update-version 2>/dev/null`
if [ "$v" != "" ] && [ "$v" -ge "$VERSION" ]; then exit; fi

## this is for update very old version of wims.
## depend of the log/update-version
## should be in an other file

echo "cleanup"
# cleanup list
rmlist="scripts/chrono.js
html/classes
modules/home/modules
modules/home/tool
bin/frename
bases/dic/en/.cnt.en.*
bases/dic/fr/.cnt.fr.*
"
for f in $rmlist
do
 rm -f public_html/$f 2>/dev/null
done

mv -f public_html/html/motd.* log 2>/dev/null
find public_html/modules -name writable -exec rm -R '{}' \; 2>/dev/null
rm -Rf public_html/html/default public_html/bin/instex* public_html/instex public_html/w/instex/* public_html/mathfonts/texgif 2>/dev/null
# rm -f log/wimslogd.pid 2>/dev/null
chmod og-w tmp
cd $wimshome/public_html/bases/sys
find . -type l -exec rm '{}' \;
for l in cn es it tw nl si
do
 if [ ! -r indignore.$l ]; then
  cp indignore.en indignore.$l >/dev/null 2>/dev/null
 fi
done

cd $wimshome/public_html/scripts/authors
find . -type l -exec rm '{}' \;
cd $wimshome/public_html/modules/classes
find . -type l -exec rm '{}' \;
for l in ??
do
 cp -p com/* $l
done
cd $wimshome/public_html/modules/template
find . -type l -exec rm '{}' \;
for l in oef.??
do
 cp oef.com/* $l
done
for l in deductio.??
do
 cp deductio.com/* $l 2>/dev/null
done
cd $wimshome/public_html/modules/adm
find texo.?? -type l -exec rm '{}' \;
for l in texo.??
do
 cp texo/* $l
done

cd $wimshome
if [ -f public_html/wims.conf ]; then mv public_html/wims.conf log/wims.conf; fi
if [ -f .wimspass ]; then mv .wimspass log/.wimspass; fi
if [ -d forums ]; then
 mv forums/[0-9]* log/forums 2>/dev/null
 rm -f public_html/modules/adm/forum/forums
 ln -s ../../../../log/forums public_html/modules/adm/forum
 cd log/forums
 ./.build-index
fi
cd $wimshome
oldcrontab=`crontab -l 2>/dev/null`
accountest=`echo "$oldcrontab" | grep -v '#' | grep 'log/account.sh'`
if [ ! -z "$accountest" ]; then
 echo site_accounting=1 >>log/wims.conf
 newcrontab=yes
fi
backtest=`echo "$oldcrontab" | grep -v '#' | grep 'bin/backup'`
if [ ! -z "$backtest" ]; then
 bh=`echo "$backtest" | cut -d' ' -f2`
 if [ "$bh" = "1" ]; then bh=2; fi
 if [ "$bh" = "23" ]; then bh=22; fi
 echo backup_hour=$bh >>log/wims.conf
 newcrontab=yes
fi

if [ "$newcrontab" = "yes" ]; then
 chmod og-rwx log/wims.conf
 echo "$oldcrontab" | grep -v 'log/account.sh' | grep -v 'bin/backup' >tmp/crontab
 crontab tmp/crontab
fi

# Clean up modules
cd $wimshome/public_html/modules
oeflist=`find . -name INDEX -exec egrep -l '^category=.*(oef|deductio|document)' '{}' \; | sed 's!/INDEX$!!'`
for m in $oeflist; do
 cd $wimshome/public_html/modules/$m
 rm -f mkindex src/Makefile src/cpp/Makefile
 if [ -L proc ]; then
  echo $m
  cat=`grep '^category=' INDEX`
  oeftest=`grep '^category=.*oef' INDEX`
  typ=
  if [ -n "$oeftest" ]; then typ=oef; typ2=oef; fi
  dedtest=`grep '^category=.*deductio' INDEX`
  if [ -n "$dedtest" ]; then typ=deductio; typ2=deduc; fi
  if [ -n "$typ" ]; then
   rm -f proc
   deftest=`find var.def -type l`
   if [ -n "$deftest" ]; then
    rm -f var.def
    echo "vardef=$typ2/var.def" >>INDEX
   fi
   links=`find . -maxdepth 1 -type l | sed 's!^./!!'`
   rm -f $links
   for f in `grep -l 'proc/' * 2>/dev/null`; do
    echo "$m/$f:"
    ed $f <<@
,s!proc/!$typ2/!g
,w
@
   done
   for f in $links; do
    cp -f $wimshome/public_html/modules/template/$typ.com/$f .
   done
  fi
 fi
done
# This one should be removed in order to accept new version.
# Otherwise it destroys the oef managing module.
# rm -Rf $wimshome/public_html/modules/H1/algebra/oefprop.cn

cd $wimshome
echo $VERSION >log/update-version
exit 0