VirtualBox

Ticket #14665 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

vboxdrv.service unit file contains an extra '$' character in the "After=" line -> fixed in 5.0.x and later as of October 9 2015

Reported by: PeterP Owned by:
Priority: minor Component: installer
Version: VirtualBox 5.0.6 Keywords:
Cc: Guest type: Linux
Host type: all

Description (last modified by frank) (diff)

Greetings,

In Debian packages of VBox 5.0.6, the /etc/init.d scripts have been replaced with, among others, native systemd units in /lib/systemd/system.

However, the /lib/systemd/system/vboxdrv.service file that is generated by the postinst-common.sh script based on LSB info in /usr/lib/virtualbox/vboxdrv.sh contains an extra '$' character in the "After=" line. After installing the Debian package of VBox 5.0.6, this line in the vboxdrv.service reads:

After=$syslog.service

As systemd does not recognize such service, it complains during system boot:

Oct 04 10:23:32 rameau systemd[1]: [/lib/systemd/system/vboxdrv.service:5] Failed to add dependency on $syslog.service, ignoring: Invalid argument

This error is caused by the /usr/lib/virtualbox/routines.sh that does not remove the '$' character from system facility names as parsed from the vboxdrv.sh file when these facilities are translated into systemd unit files.

I am attaching a patch that corrects the routines.sh script so that any '$' characters read in names of system facilities from LSB tags are removed. The patch is based on an additional use of the tr tool to delete the unwanted characters. In Debian, the tr tool is a part of the coreutils package which is an essential package, and so does not incur any additional package dependency.

Please consider integrating these corrections. Thank you!

Best regards, Peter

Attachments

routines.sh.diff Download (679 bytes) - added by PeterP 2 years ago.
Patch file correcting routines.sh to remove '$' characters from facility names

Change History

Changed 2 years ago by PeterP

Patch file correcting routines.sh to remove '$' characters from facility names

comment:1 Changed 2 years ago by PeterP

I've noticed I have swapped the "Host type" and "Guest type" in my original submission. Correctly, they should read:

Host type: Linux Guest type: All

My apologies for the mistake.

comment:2 follow-up: ↓ 3 Changed 2 years ago by Ryan Jaeb

Someone on the forums pointed out that syslog.service doesn't exist on Debian 8.

 https://forums.virtualbox.org/viewtopic.php?f=7&t=73749

comment:3 in reply to: ↑ 2 Changed 2 years ago by PeterP

Replying to Ryan Jaeb:

Someone on the forums pointed out that syslog.service doesn't exist on Debian 8.

 https://forums.virtualbox.org/viewtopic.php?f=7&t=73749

Hi Ryan. While in Debian, the "syslog.service" file indeed does not exist natively, a symlink of this name is created to point to a proper unit file that starts the particular implementation of the syslog service.

By default, in Debian, the rsyslog package is installed. Consequently, the /lib/systemd/system/rsyslog.service file contains a line saying "Alias=syslog.service", causing a symlink called /etc/systemd/system/syslog.service to be installed, pointing to /lib/systemd/system/rsyslog.service. If syslog-ng package is installed, the /etc/systemd/system/syslog.service will point to /lib/systemd/system/syslog-ng.service thanks to the same Alias line.

In any case, referring to "syslog.service" is correct; referring to "$syslog.service" is not.

Best regards, Peter

comment:4 Changed 2 years ago by frank

  • Description modified (diff)

comment:5 Changed 2 years ago by michael

  • Summary changed from vboxdrv.service unit file contains an extra '$' character in the "After=" line to vboxdrv.service unit file contains an extra '$' character in the "After=" line -> fixed in 5.0.x and later as of October 9 2015

This should now be fixed in the latest available 5.0 test builds<1>. I did not use your patch, as this was already annoying me, and I had already thought about how to fix it myself, and I ended up just dropping all dependencies which start with '$'. (A bit hacky, but we only depend on $syslog at all, and systemd handles system logger dependencies automatically through its socket mechanism, so there is no need for anything to depend on it explicitly.)

<1> https://www.virtualbox.org/wiki/Testbuilds

comment:6 Changed 2 years ago by PeterP

Hi Michael,

Okay, that makes sense. Thanks!

Best regards, Peter

comment:7 Changed 2 years ago by frank

  • Status changed from new to closed
  • Resolution set to fixed

Fix is part of VBox 5.0.8.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use