~ubuntu-branches/ubuntu/quantal/virtualbox/quantal

« back to all changes in this revision

Viewing changes to src/VBox/Installer/solaris/smf-vboxwebsrv.sh

  • Committer: Package Import Robot
  • Author(s): Felix Geyer
  • Date: 2012-05-29 10:09:31 UTC
  • mfrom: (3.1.15 sid)
  • Revision ID: package-import@ubuntu.com-20120529100931-2xayrbh5hyzm6e9p
Tags: 4.1.16-dfsg-1
* New upstream release.
* Drop 37-fix-build-gcc47.patch, fixed upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
        [ $? != 0 ] && VW_SSL_DHFILE=
54
54
        VW_SSL_RANDFILE=`/usr/bin/svcprop -p config/ssl_randfile $SMF_FMRI 2>/dev/null`
55
55
        [ $? != 0 ] && VW_SSL_RANDFILE=
 
56
        VW_AUTH_LIBRARY=`/usr/bin/svcprop -p config/auth_library $SMF_FMRI 2>/dev/null`
 
57
        [ $? != 0 ] && VW_AUTH_LIBRARY=
 
58
        VW_AUTH_PWHASH=`/usr/bin/svcprop -p config/auth_pwhash $SMF_FMRI 2>/dev/null`
 
59
        [ $? != 0 ] && VW_AUTH_PWHASH=
56
60
        VW_TIMEOUT=`/usr/bin/svcprop -p config/timeout $SMF_FMRI 2>/dev/null`
57
61
        [ $? != 0 ] && VW_TIMEOUT=
58
62
        VW_CHECK_INTERVAL=`/usr/bin/svcprop -p config/checkinterval $SMF_FMRI 2>/dev/null`
95
99
        [ -n "$VW_SSL_RANDFILE" ] && VW_SSL_RANDFILE="--randfile $VW_SSL_RANDFILE"
96
100
        [ -n "$VW_LOGFILE" ] && VW_LOGFILE="--logfile $VW_LOGFILE"
97
101
 
 
102
        # Set authentication method + password hash
 
103
        if [ -n "$VW_AUTH_LIBRARY" ]; then
 
104
            su - "$VW_USER" -c "/opt/VirtualBox/VBoxManage setproperty websrvauthlibrary \"$VW_AUTH_LIBRARY\""
 
105
            if [ $? != 0 ]; then
 
106
                echo "Error $? setting webservice authentication library to $VW_AUTH_LIBRARY"
 
107
            fi
 
108
        fi
 
109
        if [ -n "$VW_AUTH_PWHASH" ]; then
 
110
            su - "$VW_USER" -c "/opt/VirtualBox/VBoxManage setextradata global \"VBoxAuthSimple/users/$VW_USER\" \"$VW_AUTH_PWHASH\""
 
111
            if [ $? != 0 ]; then
 
112
                echo "Error $? setting webservice password hash"
 
113
            fi
 
114
        fi
 
115
 
98
116
        exec su - "$VW_USER" -c "/opt/VirtualBox/vboxwebsrv --background --host \"$VW_HOST\" --port \"$VW_PORT\" $VW_SSL $VW_SSL_KEYFILE $VW_SSL_PASSWORDFILE $VW_SSL_CACERT $VW_SSL_CAPATH $VW_SSL_DHFILE $VW_SSL_RANDFILE --timeout \"$VW_TIMEOUT\" --check-interval \"$VW_CHECK_INTERVAL\" --threads \"$VW_THREADS\" --keepalive \"$VW_KEEPALIVE\" --authentication \"$VW_AUTHENTICATION\" $VW_LOGFILE --logrotate \"$VW_ROTATE\" --logsize \"$VW_LOGSIZE\" --loginterval \"$VW_LOGINTERVAL\""
99
117
 
100
118
        VW_EXIT=$?