Opened 8 years ago
#16585 new defect
guest additions initscripts should be more flexible
| Reported by: | Timothe Litt | Owned by: | |
|---|---|---|---|
| Component: | guest additions | Version: | VirtualBox 5.1.18 |
| Keywords: | Cc: | ||
| Guest type: | Linux | Host type: | other |
Description
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
Note:
See TracTickets
for help on using tickets.

