Subversion Repositories wimsdev

Rev

Rev 4357 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
3878 kbelabas 1
#! /bin/sh
2
#
3
# Fixes the uid of ch..root. 
4
# Useless if you are not using the wims-chroot distribution.
5
# Must be run as root.
6
 
7
cd `dirname $0`/..
8
if [ ! -d chroot ]; then
9
 echo $0: you are not using the *no longer maintained* 'wims-chroot'
10
 echo distribution. Running 'setchroot' in your case is unnecessary and a
11
 echo potential security risk. Aborting the 'setchroot' script.
12
 exit
13
fi
14
 
15
if [ ! "$(id -ru )" = 0 ]; then
16
 echo
17
 echo $0: Please run this script as root!
18
 echo
19
 exit
20
fi
21
 
8858 schaersvoo 22
chk=`uname | grep BSD | tr -d '[:blank:]' | wc -c`
23
if [ $chk -gt 0 ] ; then
24
# for the happy few using NetBSD,OpenBSD,FreeBSD etc etc
25
 chown root:wheel public_html/bin/ch..root
26
else
27
 chown root:root public_html/bin/ch..root
28
fi
4357 bpr 29
chmod 6755 public_html/bin/ch..root