PATCH: tools/wineinstall Solaris compatibility
Johan Gill
johane at lysator.liu.se
Fri Nov 29 05:02:58 CST 2002
Hi, this should make wineinstall work better on Solaris. Tested also on RedHat 8. Is it OK on BSD?
Changelog:
Use who and cut instead of whoami to make wineinstall run on Solaris.
--
Johan Gill, johane at lysator.liu.se
-------------- next part --------------
Index: wine/tools/wineinstall
===================================================================
RCS file: /home/wine/wine/tools/wineinstall,v
retrieving revision 1.49
diff -u -r1.49 wineinstall
--- wine/tools/wineinstall 22 Nov 2002 20:44:13 -0000 1.49
+++ wine/tools/wineinstall 29 Nov 2002 10:54:13 -0000
@@ -168,7 +168,7 @@
}
fi
- if [ `whoami` == 'root' ]
+ if [ `who am i|cut -f1 -d' '` == 'root' ]
then {
echo "You are running wineinstall as root, this is not advisable. Please rerun as a user."
echo "Aborting."
@@ -249,7 +249,7 @@
# now do the compilation and install, we need to always do this because we
# don't want the 'make install' command we might run to run 'make' as root
- if [ `whoami` != 'root' ]
+ if [ `who am i|cut -f1 -d' '` != 'root' ]
then {
# ask the user if they want to build and install wine
echo
@@ -359,7 +359,7 @@
}
fi # [ "$ROOTINSTALL" = "yes" ]
}
- fi # [ `whoami` != 'root' ]
+ fi # [ `who am i|cut -f1 -d' '` != 'root' ]
}
fi # BINDIST
@@ -373,7 +373,7 @@
if [ "$DOGLOBALCONF" = 'auto' ]
then {
# see if we already have a system wine.conf
- if [ ! -f $GCONF ] && [ `whoami` = 'root' ]
+ if [ ! -f $GCONF ] && [ `who am i|cut -f1 -d' '` = 'root' ]
then
DOGLOBALCONF=no
echo "Creation of a global config file is not supported in wineinstall at this"
@@ -388,7 +388,7 @@
then {
# see if the user is root, if so, explicitly ask them if they want a
# local config file
- if [ `whoami` = 'root' ]
+ if [ `who am i|cut -f1 -d' '` = 'root' ]
then
echo "You are running as root. Do you want a local config file,"
echo "file, ~/.wine/config, created?"
@@ -499,7 +499,7 @@
if [ "$DOWINE" = 'yes' ]
then {
# set an appropriate DCROOT
- if [ `whoami` != 'root' ]
+ if [ `who am i|cut -f1 -d' '` != 'root' ]
then DCROOT=~/c
else DCROOT=/c
fi
@@ -634,7 +634,7 @@
fi
# make root's registry global, if desired
-if [ `whoami` = 'root' ] && [ "$DOREG" = 'yes' ] && [ "$SYSREG" = 'yes' ]
+if [ `who am i|cut -f1 -d' '` = 'root' ] && [ "$DOREG" = 'yes' ] && [ "$SYSREG" = 'yes' ]
then {
[ -d ~/.wine ] || mkdir ~/.wine
if ! [ -f $sysconfdir/wine.userreg ]
More information about the wine-patches
mailing list