I'm running 14.04 as a guest on a machine running OSX 10.9
When my vm has started I want to mount the shared folder on the host as a folder called host in my home directory. If I run the following command in a terminal window, I get the shared folder appearing in the right place:
sudo mount -t vboxsf -o rw,uid=1001,gid=1001 james ~/host
I have put the same command, minus the initial sudo in a file called mounthost in /etc/init.d. This file is owned by root:root, and has mode 777. From /etc/init.d I have made symlinks to it in all /etc/rcn.d directories except /etc/rc6.d. The symlink was called K71mounthost. Nothing happened. I could not see any files in my home host directory. Then I realised that the K stands for Kill, and I should have S for Start, so I changed the name to S71mounthost. Still nothing happened. I opened a terminal and typed in the line above and my disk was mounted.
So what am I doing wrong?
The other problem concerns starting a VPN automatically. If I enter the following command in a terminal it stops part way through the process.
sudo openvpn --config /etc/openvpn/Los\ Angeles.ovpn
The lines immediately before its stopping are:
Fri Jan 29 16:17:05 2016 TUN/TAP device tun0 opened
Fri Jan 29 16:17:05 2016 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Fri Jan 29 16:17:05 2016 /sbin/ip link set dev tun0 up mtu 1500
Fri Jan 29 16:17:05 2016 /sbin/ip addr add dev tun0 10.10.20.66/26 broadcast 10.10.20.127
Fri Jan 29 16:17:05 2016 Initialization Sequence Completed
But no VPN open and I can't start it from the network icon. In fact the only way I can start it is from the network icon when no previous attempt has been made to start it. (Before anybody asks, I have my id and password in a file and refer to that file in the LA.ovpn file on the line for auth-user-pass line.
So how do I start this automagically on boot-up?
TIA
When my vm has started I want to mount the shared folder on the host as a folder called host in my home directory. If I run the following command in a terminal window, I get the shared folder appearing in the right place:
sudo mount -t vboxsf -o rw,uid=1001,gid=1001 james ~/host
I have put the same command, minus the initial sudo in a file called mounthost in /etc/init.d. This file is owned by root:root, and has mode 777. From /etc/init.d I have made symlinks to it in all /etc/rcn.d directories except /etc/rc6.d. The symlink was called K71mounthost. Nothing happened. I could not see any files in my home host directory. Then I realised that the K stands for Kill, and I should have S for Start, so I changed the name to S71mounthost. Still nothing happened. I opened a terminal and typed in the line above and my disk was mounted.
So what am I doing wrong?
The other problem concerns starting a VPN automatically. If I enter the following command in a terminal it stops part way through the process.
sudo openvpn --config /etc/openvpn/Los\ Angeles.ovpn
The lines immediately before its stopping are:
Fri Jan 29 16:17:05 2016 TUN/TAP device tun0 opened
Fri Jan 29 16:17:05 2016 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Fri Jan 29 16:17:05 2016 /sbin/ip link set dev tun0 up mtu 1500
Fri Jan 29 16:17:05 2016 /sbin/ip addr add dev tun0 10.10.20.66/26 broadcast 10.10.20.127
Fri Jan 29 16:17:05 2016 Initialization Sequence Completed
But no VPN open and I can't start it from the network icon. In fact the only way I can start it is from the network icon when no previous attempt has been made to start it. (Before anybody asks, I have my id and password in a file and refer to that file in the LA.ovpn file on the line for auth-user-pass line.
So how do I start this automagically on boot-up?
TIA