VirtualBox

Ticket #11720: smf-vboxautostart.sh.2.diff

File smf-vboxautostart.sh.2.diff, 2.0 KB (added by kburtch, 11 years ago)

Patch against smf-vboxautostart.sh from VirtualBox 4.3.4

  • smf-vboxautostart.sh

    old new  
    2424
    2525case $VW_OPT in
    2626    start)
    27         if [ ! -x /opt/VirtualBox/VBoxAutostart ]; then
     27        if [ ! -f /opt/VirtualBox/VBoxAutostart ]; then
    2828            echo "ERROR: /opt/VirtualBox/VBoxAutostart does not exist."
    2929            return $SMF_EXIT_ERR_CONFIG
    3030        fi
    3131
    32         if [ ! -f /opt/VirtualBox/VBoxAutostart ]; then
    33             echo "ERROR: /opt/VirtualBox/VBoxAutostart does not exist."
     32        if [ ! -x /opt/VirtualBox/VBoxAutostart ]; then
     33            echo "ERROR: /opt/VirtualBox/VBoxAutostart is not executable."
    3434            return $SMF_EXIT_ERR_CONFIG
    3535        fi
    3636
     
    5151        [ -z "$VW_LOGINTERVAL" ] && VW_LOGINTERVAL=86400
    5252
    5353        # Get all users
    54         for VW_USER in `logins -g staff`
     54        for VW_USER in `logins -g vboxuser | cut -d' ' -f1`
    5555        do
    56             exec su - "$VW_USER" -c "/opt/VirtualBox/VBoxAutostart --background --start --config \"$VW_CONFIG\" --logrotate \"$VW_ROTATE\" --logsize \"$VW_LOGSIZE\" --loginterval \"$VW_LOGINTERVAL\""
     56            su - "$VW_USER" -c "/opt/VirtualBox/VBoxAutostart --background --start --config \"$VW_CONFIG\" --logrotate \"$VW_ROTATE\" --logsize \"$VW_LOGSIZE\" --loginterval \"$VW_LOGINTERVAL\""
    5757
    5858            VW_EXIT=$?
    5959            if [ $VW_EXIT != 0 ]; then
     
    9191        [ -z "$VW_LOGINTERVAL" ] && VW_LOGINTERVAL=86400
    9292
    9393        # Get all users
    94         for VW_USER in `logins -g staff`
     94        for VW_USER in `logins -g vboxuser | cut -d' ' -f1`
    9595        do
    96             exec su - "$VW_USER" -c "/opt/VirtualBox/VBoxAutostart --stop --config \"$VW_CONFIG\" --logrotate \"$VW_ROTATE\" --logsize \"$VW_LOGSIZE\" --loginterval \"$VW_LOGINTERVAL\""
     96            su - "$VW_USER" -c "/opt/VirtualBox/VBoxAutostart --stop --config \"$VW_CONFIG\" --logrotate \"$VW_ROTATE\" --logsize \"$VW_LOGSIZE\" --loginterval \"$VW_LOGINTERVAL\""
    9797
    9898            VW_EXIT=$?
    9999            if [ $VW_EXIT != 0 ]; then

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy