﻿id	summary	reporter	owner	description	type	status	component	version	resolution	keywords	cc	guest	host
16585	guest additions initscripts should be more flexible	Timothe Litt		"Adding options to the virtualbox guest additions startup requires editing the init script.  This is a pain, especially when installing from source or creating a new install. Note that with systemd the init file isn't in /etc/init.d, but rather /opt/VBoxGuestAdditions-$VERSION/init - which is refreshed on an install/upgrade.

Most init scripts separate the startup script from options by providing a file in /etc/default or /etc/sysconfig.

e.g. This should work for most distributions conventions
{{{
/etc/sysconfig:
OPTIONS=""--disable-timesync""

https://www.virtualbox.org/browser/vbox/trunk/src/VBox/Additions/linux/installer/vboxadd-service.sh

[ -f /etc/default/vboxadd-service ] && . /etc/default/vboxadd-service
[ -f /etc/sysconfig/vboxadd-service ] && . /etc/sysconfig/vboxadd-service

and 
         vboxaddrunning || {
             echo ""VirtualBox Additions module not loaded!""
             exit 1
         }
         testbinary
-        daemon $binary --pidfile $PIDFILE > /dev/null
+        daemon $binary --pidfile $PIDFILE $OPTIONS > /dev/null
         RETVAL=$?
         succ_msg
     fi

     return $RETVAL
}}}"	defect	new	guest additions	VirtualBox 5.1.18				Linux	other
