VirtualBox

Ignore:
Timestamp:
Dec 9, 2012 10:19:53 PM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
82569
Message:

Installer/linux: options to create or remove an init script for the headless X.Org service.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Installer/linux/scripts/VBoxHeadlessXOrg.sh

    r44063 r44071  
    7878Options:
    7979
    80   -c|--conf-file)        Specify an alternative locations for the configuration
     80  -c|--conf-file         Specify an alternative locations for the configuration
    8181                         file.  The default location is:
    8282                           "${CONFIGURATION_FILE}"
     83
     84  --install              Install the service to run at system start-up.
     85
     86  --uninstall            Revert the installation done by the "--install" option.
    8387
    8488  --help|--usage         Print this text.
     
    186190    display=`expr ${display} + 1`
    187191    esac
    188   done 
     192  done
    189193}
    190194HEADLESS_X_ORG_SERVER_PRE_COMMAND="default_pre_command"
     
    263267      exit 0
    264268      ;;
     269    --install)
     270      do_install="install"
     271      ;;
     272    --uninstall)
     273      do_install="uninstall"
     274      ;;
    265275    *)
    266276      banner
     
    272282
    273283[ -r "${CONFIGURATION_FILE}" ] && . "${CONFIGURATION_FILE}"
     284
     285if [ -n "${do_install}" ]; then
     286  cd "${SCRIPT_FOLDER}"
     287  SCRIPT_FOLDER=$(pwd)"/"
     288  CONFIGURATION_FILE_ESCAPED=$(echo "${CONFIGURATION_FILE}" | sed 's/\([ \%]\)/\\\1/g')
     289  if [ "x${do_install}" = "xinstall" ]; then
     290    ../helpers/install_service --command "${SCRIPT_FOLDER}"$(basename "${SCRIPT_NAME}") --arguments "--configuration-file ${CONFIGURATION_FILE_ESCAPED}" --service-name "${SERVICE_NAME}" --description "${SERVICE_DESCRIPTION}" --enable
     291  else
     292    ../helpers/install_service --service-name "${SERVICE_NAME}" --remove
     293  fi
     294  exit 0
     295fi
    274296
    275297# Change to the root directory so we don't hold any other open.
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette