-1

Environment :

Virtualization software : VMware Workstation 12 Player

Guest Machine : Red Hat 6.4

Host Machine : Windows 7 Professional Service Pack 1

Question :

I'm trying to execute automatically a svn update at the boot of my virtual machine. I edited the rc.local file like this :

#!/bin/sh -e
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't 
# want to do the full Sys V style init stuff.

sleep 10

svn update path/to/repository

exit 0

But with this the virtual machine won't boot, it keeps loading (If I remove the svn command line, there is no problem). And if I try to shutdown or restart the guest, we can see this :

Guest machine window

So it means that svn command was executed but it didn't work. I already tried writing "svn update --username user --password xxx" but same result. How do I get the svn command to run?

Chaton
  • 43
  • 1
  • 8

1 Answers1

0

What if you create the file in /etc/init.d/svnserve

#!/bin/bash 
### BEGIN INIT INFO 
# Provides:          svnserve 
# Required-Start:    $local_fs $remote_fs $network $syslog 
# Required-Stop:     $local_fs $remote_fs $network $syslog 
# Default-Start:     2 3 4 5 
# Default-Stop:      0 1 6 
# X-Interactive:     true 
# Short-Description: Start/stop svnserve 
### END INIT INFO 

svnserve -d -r /PATH/TO/YOUR/REPOSITORY

Make it Executable:

chmod u+x /etc/init.d/svnserve

Create links from runlevels to the script:

 update-rc.d svnserve 

Then check if the links were created correctly

find /etc/ -name '*svnserve*'

Best regards

Xsi

XsiSecOfficial
  • 954
  • 8
  • 20
  • Thank you for your answer ! There is already a svnserve file : http://pasted.co/4000d4db . I modified it to make it look like yours, I used chkconfig but still it doesn't do anything at boot. – Chaton Mar 08 '16 at 16:26