VirtualBox

Opened 12 years ago

Closed 8 years ago

#11174 closed enhancement (obsolete)

Add Support for Foresight Linux

Reported by: johnha Owned by:
Component: guest additions Version: VirtualBox 4.2.4
Keywords: foresight vboxsf guest Cc:
Guest type: Linux Host type: all

Description

To add support for the Foresight Linux distribution to vboxadd guest additions. A few very simple changes are required in the vboxadd and vboxadd-service startup scripts.

Mainly these changes are to check for the existence of /etc/conaryrc, and if so set system to foresight. Then wherever system=redhat, foresight will also use those functions. However, the pidfile needs to change from /var/lock/subsys/vboxadd-service to /var/lock/subsys/vboxadd because foresight scripts don't look for "-service" when navigating scripts at shutdown time. This means that without these changes, vboxsf mounts do not get unmounted when the box is shutdown or reboot. A patch to apply against the latest version of vbox guest tools to support foresight linux follows. So far, my testing with these changes to the init scripts for vboxadd and vboxadd-service work perfectly with the Foresight distribution.

--- orig/vboxadd	2012-11-07 22:54:55.000000000 -0700
+++ new/vboxadd	2012-11-07 22:50:30.000000000 -0700
@@ -65,6 +65,8 @@
     system=gentoo
 elif [ -f /etc/lfs-release -a -d /etc/rc.d/init.d ]; then
     system=lfs
+elif [ -f /etc/conaryrc ]; then
+    system=foresight
 else
     system=other
 fi
@@ -85,7 +87,7 @@
     }
 fi
 
-if [ "$system" = "redhat" ]; then
+if [ "$system" = "redhat" ] || [ "$system" = "foresight" ]; then
     . /etc/init.d/functions
     fail_msg() {
         echo_failure
diff -Nuar orig/vboxadd-service new/vboxadd-service
--- orig/vboxadd-service	2012-11-07 22:55:03.000000000 -0700
+++ new/vboxadd-service	2012-11-07 22:50:41.000000000 -0700
@@ -49,6 +49,9 @@
 elif [ -f /etc/lfs-release ]; then
     system=lfs
     PIDFILE="/var/run/vboxadd-service.pid"
+elif [ -f /etc/conaryrc ]; then
+    system=foresight
+    PIDFILE="/var/lock/subsys/vboxadd"
 else
     system=other
     if [ -d /var/run -a -w /var/run ]; then
@@ -56,7 +59,7 @@
     fi
 fi
 
-if [ "$system" = "redhat" ]; then
+if [ "$system" = "redhat" ] || [ "$system" = "foresight" ] ; then
     . /etc/init.d/functions
     fail_msg() {
         echo_failure

Attachments (1)

initscripts.patch (1.2 KB ) - added by johnha 12 years ago.
The patch that was inline in the description, only in a text file.

Download all attachments as: .zip

Change History (4)

by johnha, 12 years ago

Attachment: initscripts.patch added

The patch that was inline in the description, only in a text file.

comment:1 by johnha, 12 years ago

Also of note, in theory, these changes should have no impact on other systems or distributions.

comment:2 by Michael Thayer, 12 years ago

Our current direction is to try to simplify the horrible init script mess we have by having less system-specifics, not more. Does Foresight also use chkconfig, or anything else that would let us simply detect it as "something which works like RedHat"? I would also be interested if you could point me to whatever in Foresight has trouble with PID-files ending in "-service", say in a public svn repository or something similar.

comment:3 by aeichner, 8 years ago

Resolution: obsolete
Status: newclosed

Please reopen if still relevant with a recent VirtualBox release.

Note: See TracTickets for help on using tickets.

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