On 06-10-2014 18:09, Tor Houghton wrote:
> Hi,
>
> Dumb question: I'm running 'sudo ntpd -s' as part of a remote command to an
> OpenBSD guest[*]; unless I add a 'pkill sshd' to the end of the remote
> command, e.g.
>
>    ssh guesthost 'sudo pkill -9 ntpd && sudo ntpd -s && date && pkill sshd'
>
> the ssh connection won't disconnect. Why is this ('sudo ntpd -s' by itself,
> in a shell, returns a prompt)?
>
> Regards,
>
> Tor
>
> * Yep, it's a clunky work-around for resetting the guest's clock after
> VirtualBox startvm'ing a savestate'd guest (perhaps there is a better way?
> :-})
>
You have lots of options. You can install the virtualbox guest additions
(as far as I know the OpenBSD doesn't have it) if your machine is linux.
But in your case, instead of using ntpd, you could run a ntpd on your vm
host and in your guest you should run the rdate(8) command. It will not
daemonize itself, it will just set the clock (or not) and exit. You
could even run it in the machine start, just put it on the
/etc/rc.conf.local.

Cheers,

[demime 1.01d removed an attachment of type application/pkcs7-signature which 
had a name of smime.p7s]

Reply via email to