summaryrefslogtreecommitdiff
path: root/desktop/scripts/unopkg.sh
diff options
context:
space:
mode:
authorKatarina Behrens <Katarina.Behrens@cib.de>2015-06-18 17:00:55 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-06-19 15:57:44 +0200
commitc15b96a4b9ad0c37e7848e8460732e7d088529e3 (patch)
treed6c0e1d4ebc479329cd544ff1fc27ecfe80130eb /desktop/scripts/unopkg.sh
parent56813553a39716f710d1406cbc1c90435ca2e223 (diff)
C++ solution of 'unopkg can't be used by root'
This way should cover all un*x-like OSes (unopkg.sh excludes e.g. OS X) This effectively reverts commits 723e099972c1645 and 9444ffc93a3335 Change-Id: I0b4425d1c9eff8e51e5d9a4dab35775084106a23 (cherry picked from commit faa2c06226146e3ab4b7fa8096cf213ea9d52a23)
Diffstat (limited to 'desktop/scripts/unopkg.sh')
-rwxr-xr-xdesktop/scripts/unopkg.sh19
1 files changed, 1 insertions, 18 deletions
diff --git a/desktop/scripts/unopkg.sh b/desktop/scripts/unopkg.sh
index ca1e3bc7f444..18d0a7346e01 100755
--- a/desktop/scripts/unopkg.sh
+++ b/desktop/scripts/unopkg.sh
@@ -49,8 +49,6 @@ AIX)
;;
esac
-help_mode=0
-isnotuser=0
for arg in $@
do
case "$arg" in
@@ -59,25 +57,10 @@ do
-env:*) BOOTSTRAPVARS=$BOOTSTRAPVARS" ""$arg";;
# make sure shared extensions will be readable by all users
- --shared)
- umask 0022
- isnotuser=1
- ;;
-
- --bundled) isnotuser=1;;
- -h|--help) help_mode=1;;
+ --shared) umask 0022;;
esac
done
-# we don't really want root to run unopkg without --shared or --bundled option
-# but we might at least let him read help
-if [ "$(id -u)" -eq "0" ]; then
- if [ $isnotuser -eq 0 ] && [ $help_mode -eq 0 ]; then
- echo "Cannot run '${0} $*' as root without --shared or --bundled option."
- exit 1
- fi
-fi
-
# extend the ld_library_path for java: javaldx checks the sofficerc for us
if [ -x "${sd_prog}/javaldx" ] ; then
my_path=`"${sd_prog}/javaldx" $BOOTSTRAPVARS \