Re: [arch-general] remote poweroff with systemd

2013-08-07 Thread Paul Gideon Dann
On Wednesday 07 Aug 2013 14:50:53 Mike Cloaked wrote: > Would it be possible to delay the reboot command whilst connected in an ssh > session by using something like: > > # at now + 2 minutes systemctl reboot > > then exit the ssh session and wait until the remote machine has rebooted? > > I hav

Re: [arch-general] OpenNTPd not correcting time on boot

2013-08-07 Thread Sébastien Luttringer
On Wed, Aug 7, 2013 at 1:04 PM, Joe Eaves wrote: > On 3 July 2013 08:36, Maxime GAUDUIN wrote: >> >> >> I did not test this, but you may want to make it "want" >> network-online.target instead of network.target. >> >> Cheers, >> >> -- >> Maxime > > Hi, > > I tried this but it didn't work. I set bo

Re: [arch-general] remote poweroff with systemd

2013-08-07 Thread Tom Gundersen
On Wed, Aug 7, 2013 at 2:17 PM, Fons Adriaensen wrote: > On Wed, Aug 07, 2013 at 01:15:28PM +0200, Tom Gundersen wrote: > >> It is correct that systemtl poweroff is synchronous, but using telinit >> or --no-block will avoid that. > > Are you sure about telinit ? It was the first thing I tried, ass

Re: [arch-general] remote poweroff with systemd

2013-08-07 Thread Mike Cloaked
On Wed, Aug 7, 2013 at 11:23 AM, Joe Eaves wrote: > > How about something like 'shutdown -t 5'? I know if I put that into an SSH > session manually, it'll print me a wall message and then I have some time > to hit CTRL-D (or exit if I'm quick), so why would an automated command not > be able to d

Re: [arch-general] Does leading slash matter in install scriptlets?

2013-08-07 Thread Allan McRae
On 07/08/13 20:46, lolilolicon wrote: > On Wed, Aug 7, 2013 at 6:19 PM, Allan McRae wrote: >> >> I believe it possibly did in the past, but pacman chroots into the >> --root directory before running any scripts so it makes no difference. > > That's great, seeing that there're so many packages on

Re: [arch-general] Does leading slash matter in install scriptlets?

2013-08-07 Thread lolilolicon
On Wed, Aug 7, 2013 at 6:19 PM, Allan McRae wrote: > > I believe it possibly did in the past, but pacman chroots into the > --root directory before running any scripts so it makes no difference. That's great, seeing that there're so many packages on both sides. Is a leading slash preferred, then?

Re: [arch-general] OpenNTPd not correcting time on boot

2013-08-07 Thread Joe Eaves
On 3 July 2013 08:36, Maxime GAUDUIN wrote: > > > I did not test this, but you may want to make it "want" > network-online.target instead of network.target. > > Cheers, > > -- > Maxime Hi, I tried this but it didn't work. I set both 'wants' and 'after' to network-online.target, should I only have

Re: [arch-general] remote poweroff with systemd

2013-08-07 Thread Joe Eaves
(Resending, used the wrong email before. Again. -_-' ) On 6 August 2013 16:18, Fons Adriaensen wrote: > > What difference should the '&& exit' make ? The ssh will terminate > anyway when poweroff returns. Problem is that by then it's too > late. > > I think the fundamental problem is that you just

Re: [arch-general] remote poweroff with systemd

2013-08-07 Thread Fons Adriaensen
On Wed, Aug 07, 2013 at 01:15:28PM +0200, Tom Gundersen wrote: > It is correct that systemtl poweroff is synchronous, but using telinit > or --no-block will avoid that. Are you sure about telinit ? It was the first thing I tried, assuming it would asynchronous. But the man page says nothing abou

Re: [arch-general] remote poweroff with systemd

2013-08-07 Thread Damjan
I didn't yet try 'systemctl poweroff', but according the man page, 'telinit 0' is equivalent to it. Another one I didn't yet try (just discovered it in the man pages but I don't have access to the installation ATM) is systemctl's --host option, in other words, let systemctl do the ssh. Can this b

Re: [arch-general] remote poweroff with systemd

2013-08-07 Thread Tom Gundersen
On Wed, Aug 7, 2013 at 12:58 PM, Rodrigo Rivas wrote: > On Tue, Aug 6, 2013 at 5:18 PM, Fons Adriaensen wrote: > >> On Tue, Aug 06, 2013 at 01:56:09PM +0100, Paul Gideon Dann wrote: >> >> > ssh -t remote1 "sudo systemctl poweroff && exit" >> > >> > Technically I guess it's a race condition, but t

Re: [arch-general] remote poweroff with systemd

2013-08-07 Thread Rodrigo Rivas
On Tue, Aug 6, 2013 at 5:18 PM, Fons Adriaensen wrote: > On Tue, Aug 06, 2013 at 01:56:09PM +0100, Paul Gideon Dann wrote: > > > ssh -t remote1 "sudo systemctl poweroff && exit" > > > > Technically I guess it's a race condition, but the command should > terminate > > and close the SSH session bef

Re: [arch-general] remote poweroff with systemd

2013-08-07 Thread Paul Gideon Dann
On Tuesday 06 Aug 2013 15:18:39 Fons Adriaensen wrote: > Thanks to all who suggested solutions. > > What difference should the '&& exit' make ? The ssh will terminate > anyway when poweroff returns. Problem is that by then it's too > late. > > I think the fundamental problem is that you just can'

Re: [arch-general] Does leading slash matter in install scriptlets?

2013-08-07 Thread Allan McRae
On 07/08/13 18:35, lolilolicon wrote: > Many install scriptlets include the leading slash in file paths, e.g. > > post_install() { > update-desktop-database -q > gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor > } > > while some strip the leading slash, > > post_install() { >

[arch-general] Does leading slash matter in install scriptlets?

2013-08-07 Thread lolilolicon
Many install scriptlets include the leading slash in file paths, e.g. post_install() { update-desktop-database -q gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor } while some strip the leading slash, post_install() { update-desktop-database -q gtk-update-icon-cache -q -t

Re: [arch-general] remote poweroff with systemd

2013-08-07 Thread Fons Adriaensen
On Tue, Aug 06, 2013 at 01:56:09PM +0100, Paul Gideon Dann wrote: > ssh -t remote1 "sudo systemctl poweroff && exit" > > Technically I guess it's a race condition, but the command should terminate > and close the SSH session before OpenSSH is shut down, so you shouldn't get > the hang. > > Al