unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Install script supporting sysV init?
@ 2020-01-26 22:02 Jan
  2020-01-26 22:38 ` Danny Milosavljevic
  2020-02-05 19:44 ` Joshua Branson
  0 siblings, 2 replies; 15+ messages in thread
From: Jan @ 2020-01-26 22:02 UTC (permalink / raw)
  To: guix-devel

Hi Guix,
Does someone plan writing init script for Guix, so it will work on
distributions using sysV init? There are still distributions not using
systemd, for example Devuan and last time I checked, the install script
doesn't support it.
I ask because I use Devuan on my more powerful machine, where I can't
install Guix System, because of the proprietary nightmare related to
drivers, I reported last summer (the issue is unsolvable).
If I could run Guix on this machine, instead of my old thinkpad with 3GB
of RAM, working on Jami would be easier for me - I'm trying to
investigate the source of bugs in our package, but I can't build
packages such as webkit-gtk or Qt on my potato laptop.


Jan Wielkiewicz

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Install script supporting sysV init?
  2020-01-26 22:02 Install script supporting sysV init? Jan
@ 2020-01-26 22:38 ` Danny Milosavljevic
  2020-01-27 16:09   ` Jan
  2020-01-28 10:34   ` Ludovic Courtès
  2020-02-05 19:44 ` Joshua Branson
  1 sibling, 2 replies; 15+ messages in thread
From: Danny Milosavljevic @ 2020-01-26 22:38 UTC (permalink / raw)
  To: Jan; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 1955 bytes --]

Hi Jan,

> Does someone plan writing init script for Guix, so it will work on
> distributions using sysV init? There are still distributions not using
> systemd, for example Devuan and last time I checked, the install script
> doesn't support it.

I'm all for supporting it, but I can't remember all the idiocracies and I have no
machine to test it on.

That said, sysv init scripts are just shell scripts which support the arguments
"start", "status", "stop" and sometimes have an LSB header specifying where
to put the stuff (which runlevels are supposed to have it).

We would basically put the following file into /etc/init.d/guix-daemon
and make it executable:

#!/bin/bash -e
### BEGIN INIT INFO
# Provides:          guix-daemon
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Guix build daemon
# Description:       Provides a daemon that does builds for Guix
### END INIT INFO

case "$1" in
start)
  daemonize -a -e /var/log/guix-daemon-stderr.log -o /var/log/guix-daemon-stdout.log -E GUIX_LOCPATH=/var/guix/profiles/per-user/root/guix-profile/lib/locale -E LC_ALL=en_US.utf8 -p /var/lock/guix-daemon.pid guix-daemon --build-users-group=guixbuild
  ;;
stop)
  pid="`cat /var/lock/guix-daemon.pid`"
  if [ ! -z "${pid}" ]
  then
    kill "${pid}"
    sleep 10
    kill -9 "${pid}"
  fi
  # TODO: Maybe remove /var/lock/guix-daemon.pid ?
  ;;
status)
  pid="`cat /var/lock/guix-daemon.pid`"
  if [ ! -z "${pid}" ]
  then
    if ps "${pid}" > /dev/null 2> /dev/null
    then
      echo "running"
    else
      echo "stale pid file"
    fi
  else
    echo "not running"
  fi
  ;;
*)
  echo "Usage: $0 (start|stop|status)"
  ;;
esac

I think in order to actually install the service one does this:

$ sudo update-rc.d guix-daemon defaults
$ sudo update-rc.d guix-daemon enable

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Install script supporting sysV init?
  2020-01-26 22:38 ` Danny Milosavljevic
@ 2020-01-27 16:09   ` Jan
  2020-01-27 18:05     ` Julien Lepiller
  2020-01-28 10:34   ` Ludovic Courtès
  1 sibling, 1 reply; 15+ messages in thread
From: Jan @ 2020-01-27 16:09 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: guix-devel

Thanks, this generally works, except this line:
> GUIX_LOCPATH=/var/guix/profiles/per-user/root/guix-profile/lib/locale
> -E LC_ALL=en_US.utf8 -p /var/lock/guix-daemon.pid guix-daemon
While trying to start the daemon, daemonize complains about the path
not being absolute.
I changed "guix-daemon"
to
"/gnu/store/ncknl03pkmamrxg7q9nxi1rn1qhvwbi9-guix-1.0.1/bin/guix-daemon"
and it worked, but it isn't the right solution I guess. What should I
do?

On Sun, 26 Jan 2020 23:38:20 +0100
Danny Milosavljevic <dannym@scratchpost.org> wrote:

> Hi Jan,
> 
> > Does someone plan writing init script for Guix, so it will work on
> > distributions using sysV init? There are still distributions not
> > using systemd, for example Devuan and last time I checked, the
> > install script doesn't support it.  
> 
> I'm all for supporting it, but I can't remember all the idiocracies
> and I have no machine to test it on.
> 
> That said, sysv init scripts are just shell scripts which support the
> arguments "start", "status", "stop" and sometimes have an LSB header
> specifying where to put the stuff (which runlevels are supposed to
> have it).
> 
> We would basically put the following file into /etc/init.d/guix-daemon
> and make it executable:
> 
> #!/bin/bash -e
> ### BEGIN INIT INFO
> # Provides:          guix-daemon
> # Required-Start:    $remote_fs $syslog
> # Required-Stop:     $remote_fs $syslog
> # Default-Start:     2 3 4 5
> # Default-Stop:      0 1 6
> # Short-Description: Guix build daemon
> # Description:       Provides a daemon that does builds for Guix
> ### END INIT INFO
> 
> case "$1" in
> start)
>   daemonize -a -e /var/log/guix-daemon-stderr.log
> -o /var/log/guix-daemon-stdout.log -E
> GUIX_LOCPATH=/var/guix/profiles/per-user/root/guix-profile/lib/locale
> -E LC_ALL=en_US.utf8 -p /var/lock/guix-daemon.pid guix-daemon
> --build-users-group=guixbuild ;; stop)
> pid="`cat /var/lock/guix-daemon.pid`" if [ ! -z "${pid}" ] then
>     kill "${pid}"
>     sleep 10
>     kill -9 "${pid}"
>   fi
>   # TODO: Maybe remove /var/lock/guix-daemon.pid ?
>   ;;
> status)
>   pid="`cat /var/lock/guix-daemon.pid`"
>   if [ ! -z "${pid}" ]
>   then
>     if ps "${pid}" > /dev/null 2> /dev/null
>     then
>       echo "running"
>     else
>       echo "stale pid file"
>     fi
>   else
>     echo "not running"
>   fi
>   ;;
> *)
>   echo "Usage: $0 (start|stop|status)"
>   ;;
> esac
> 
> I think in order to actually install the service one does this:
> 
> $ sudo update-rc.d guix-daemon defaults
> $ sudo update-rc.d guix-daemon enable


Jan Wielkiewicz

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Install script supporting sysV init?
  2020-01-27 16:09   ` Jan
@ 2020-01-27 18:05     ` Julien Lepiller
  2020-01-28 13:06       ` Jan
  0 siblings, 1 reply; 15+ messages in thread
From: Julien Lepiller @ 2020-01-27 18:05 UTC (permalink / raw)
  To: guix-devel, Jan, Danny Milosavljevic

Le 27 janvier 2020 11:09:20 GMT-05:00, Jan <tona_kosmicznego_smiecia@interia.pl> a écrit :
>Thanks, this generally works, except this line:
>> GUIX_LOCPATH=/var/guix/profiles/per-user/root/guix-profile/lib/locale
>> -E LC_ALL=en_US.utf8 -p /var/lock/guix-daemon.pid guix-daemon
>While trying to start the daemon, daemonize complains about the path
>not being absolute.
>I changed "guix-daemon"
>to
>"/gnu/store/ncknl03pkmamrxg7q9nxi1rn1qhvwbi9-guix-1.0.1/bin/guix-daemon"
>and it worked, but it isn't the right solution I guess. What should I
>do?
>
>On Sun, 26 Jan 2020 23:38:20 +0100
>Danny Milosavljevic <dannym@scratchpost.org> wrote:
>
>> Hi Jan,
>> 
>> > Does someone plan writing init script for Guix, so it will work on
>> > distributions using sysV init? There are still distributions not
>> > using systemd, for example Devuan and last time I checked, the
>> > install script doesn't support it.  
>> 
>> I'm all for supporting it, but I can't remember all the idiocracies
>> and I have no machine to test it on.
>> 
>> That said, sysv init scripts are just shell scripts which support the
>> arguments "start", "status", "stop" and sometimes have an LSB header
>> specifying where to put the stuff (which runlevels are supposed to
>> have it).
>> 
>> We would basically put the following file into
>/etc/init.d/guix-daemon
>> and make it executable:
>> 
>> #!/bin/bash -e
>> ### BEGIN INIT INFO
>> # Provides:          guix-daemon
>> # Required-Start:    $remote_fs $syslog
>> # Required-Stop:     $remote_fs $syslog
>> # Default-Start:     2 3 4 5
>> # Default-Stop:      0 1 6
>> # Short-Description: Guix build daemon
>> # Description:       Provides a daemon that does builds for Guix
>> ### END INIT INFO
>> 
>> case "$1" in
>> start)
>>   daemonize -a -e /var/log/guix-daemon-stderr.log
>> -o /var/log/guix-daemon-stdout.log -E
>> GUIX_LOCPATH=/var/guix/profiles/per-user/root/guix-profile/lib/locale
>> -E LC_ALL=en_US.utf8 -p /var/lock/guix-daemon.pid guix-daemon
>> --build-users-group=guixbuild ;; stop)
>> pid="`cat /var/lock/guix-daemon.pid`" if [ ! -z "${pid}" ] then
>>     kill "${pid}"
>>     sleep 10
>>     kill -9 "${pid}"
>>   fi
>>   # TODO: Maybe remove /var/lock/guix-daemon.pid ?
>>   ;;
>> status)
>>   pid="`cat /var/lock/guix-daemon.pid`"
>>   if [ ! -z "${pid}" ]
>>   then
>>     if ps "${pid}" > /dev/null 2> /dev/null
>>     then
>>       echo "running"
>>     else
>>       echo "stale pid file"
>>     fi
>>   else
>>     echo "not running"
>>   fi
>>   ;;
>> *)
>>   echo "Usage: $0 (start|stop|status)"
>>   ;;
>> esac
>> 
>> I think in order to actually install the service one does this:
>> 
>> $ sudo update-rc.d guix-daemon defaults
>> $ sudo update-rc.d guix-daemon enable
>
>
>Jan Wielkiewicz

I think you should set it to /var/guix/profiles/per-user/root/current-guix/bin/guix-daemon (or something similar). I think we already do that for systemd?

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Install script supporting sysV init?
  2020-01-26 22:38 ` Danny Milosavljevic
  2020-01-27 16:09   ` Jan
@ 2020-01-28 10:34   ` Ludovic Courtès
  1 sibling, 0 replies; 15+ messages in thread
From: Ludovic Courtès @ 2020-01-28 10:34 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: guix-devel

Hi,

Danny Milosavljevic <dannym@scratchpost.org> skribis:

> That said, sysv init scripts are just shell scripts which support the arguments
> "start", "status", "stop" and sometimes have an LSB header specifying where
> to put the stuff (which runlevels are supposed to have it).
>
> We would basically put the following file into /etc/init.d/guix-daemon
> and make it executable:

When you have something that works, we can add it next to the Upstart
and systemd files in etc/ (in the source tree), along with documentation
and proper handling in ‘guix-install.sh’.

Ludo’.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Install script supporting sysV init?
  2020-01-27 18:05     ` Julien Lepiller
@ 2020-01-28 13:06       ` Jan
  2020-01-28 14:52         ` Danny Milosavljevic
  0 siblings, 1 reply; 15+ messages in thread
From: Jan @ 2020-01-28 13:06 UTC (permalink / raw)
  To: Julien Lepiller; +Cc: guix-devel

On Mon, 27 Jan 2020 13:05:11 -0500
Julien Lepiller <julien@lepiller.eu> wrote:

> I think you should set it
> to /var/guix/profiles/per-user/root/current-guix/bin/guix-daemon (or
> something similar). I think we already do that for systemd?

Thanks, it works!

One step further for Guix becoming the universal package manager :P



Jan Wielkiewicz

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Install script supporting sysV init?
  2020-01-28 13:06       ` Jan
@ 2020-01-28 14:52         ` Danny Milosavljevic
  2020-01-28 15:25           ` Danny Milosavljevic
  2020-01-28 22:54           ` Jan
  0 siblings, 2 replies; 15+ messages in thread
From: Danny Milosavljevic @ 2020-01-28 14:52 UTC (permalink / raw)
  To: Jan; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 757 bytes --]

Hi Jan,

cool!

Could you try what happens in the corner cases:

(1) Try to start it twice.  The second start attempt should fail and $? should reflect that
(2) Try to stop it twice.  I'm pretty sure that should work (do nothing) the second time.  What does sysv say should happen?  Should it error?
(3) Does status work?
(4) Put a nonsensical (non-existent) pid into the pid file and try to stop it.  Or start it.  What does sysv say should happen?  Should it clean up?

If the pid of the wrong process is in the pid file and one tries to stop it or start it, what does sysv say should happen?  Should one check the args whether it's the correct program?

If these things are handled correctly, we can add it to guix master.

BR,
   Danny

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Install script supporting sysV init?
  2020-01-28 14:52         ` Danny Milosavljevic
@ 2020-01-28 15:25           ` Danny Milosavljevic
  2020-01-28 22:54           ` Jan
  1 sibling, 0 replies; 15+ messages in thread
From: Danny Milosavljevic @ 2020-01-28 15:25 UTC (permalink / raw)
  To: Jan; +Cc: guix-devel


[-- Attachment #1.1: Type: text/plain, Size: 346 bytes --]

> (1) Try to start it twice.  The second start attempt should fail and $? should reflect that

Nope, according to https://refspecs.linuxfoundation.org/LSB_2.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html the second attempt should do nothing and indicate success.

Attached a new version (moved pid file from /var/lock to /var/run ).

[-- Attachment #1.2: guix-daemon --]
[-- Type: application/octet-stream, Size: 1688 bytes --]

#!/bin/bash
### BEGIN INIT INFO
# Provides:          guix-daemon
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Guix build daemon
# Description:       Provides a daemon that does builds for Guix
### END INIT INFO

set -e
set -o pipefail
mkdir -p "/var/run"

case "$1" in
start)
  if [ -f "/var/run/guix-daemon.pid" ]
  then
    pid="`cat /var/run/guix-daemon.pid`"
    if ps www "${pid}" |grep -qa guix-daemon
    then
      exit 0
    else
      exit 1
    fi
  else
    daemonize \
      -a \
      -e /var/log/guix-daemon-stderr.log \
      -o /var/log/guix-daemon-stdout.log \
      -E GUIX_LOCPATH=/var/guix/profiles/per-user/root/guix-profile/lib/locale \
      -E LC_ALL=en_US.utf8 \
      -p /var/run/guix-daemon.pid \
      /var/guix/profiles/per-user/root/current-guix/bin/guix-daemon \
      --build-users-group=guixbuild
  fi
  ;;
stop)
  if [ -f "/var/run/guix-daemon.pid" ]
  then
    pid="`cat /var/run/guix-daemon.pid`"
    if ps www "${pid}" |grep -qa guix-daemon
    then
      kill "${pid}"
      sleep 10
      kill -9 "${pid}" || true
      exit 0
    fi
  else
    exit 0
  fi
  ;;
status)
  if [ -f "/var/run/guix-daemon.pid" ]
  then
    pid="`cat /var/run/guix-daemon.pid`"
    if ps www "${pid}" |grep -qa guix-daemon
    then
      echo "guix-daemon is running"
      exit 0
    else
      echo "guix-daemon has a stale pid file"
      exit 1
    fi
  else
    echo "guix-daemon is not running"
    exit 3
  fi
  ;;
restart)
force-reload)
  "$0" stop
  "$0" start
  ;;
*)
  echo "Usage: $0 (start|stop|status|restart|force-reload)"
  exit 3
  ;;
esac

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Install script supporting sysV init?
  2020-01-28 14:52         ` Danny Milosavljevic
  2020-01-28 15:25           ` Danny Milosavljevic
@ 2020-01-28 22:54           ` Jan
  2020-01-28 22:58             ` Danny Milosavljevic
  1 sibling, 1 reply; 15+ messages in thread
From: Jan @ 2020-01-28 22:54 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: guix-devel

On Tue, 28 Jan 2020 15:52:34 +0100
Danny Milosavljevic <dannym@scratchpost.org> wrote:

> Hi Jan,
> 
> cool!
> 
> Could you try what happens in the corner cases:
> 
> (1) Try to start it twice.  The second start attempt should fail and
> $? should reflect that 
First and second start works the same.
> (2) Try to stop it twice.  I'm pretty sure
> that should work (do nothing) the second time.  What does sysv say
> should happen?  Should it error? 
The first stop takes way too long and throws an error:
/etc/init.d/guix-daemon: line 47: kill: (9107) - Process not found
>(3) Does status work?
It throws:
guix-daemon has a stale pid file
> (4) Put a
> nonsensical (non-existent) pid into the pid file and try to stop it.
> Or start it.  What does sysv say should happen?  Should it clean up?
> If the pid of the wrong process is in the pid file and one tries to
> stop it or start it, what does sysv say should happen?  Should one
> check the args whether it's the correct program?
Like what for example? I don't want to kill something important.
> If these things are handled correctly, we can add it to guix master.
> 
> BR,
>    Danny


Jan Wielkiewicz

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Install script supporting sysV init?
  2020-01-28 22:54           ` Jan
@ 2020-01-28 22:58             ` Danny Milosavljevic
  2020-01-28 23:07               ` Jan
  0 siblings, 1 reply; 15+ messages in thread
From: Danny Milosavljevic @ 2020-01-28 22:58 UTC (permalink / raw)
  To: Jan; +Cc: guix-devel


[-- Attachment #1.1: Type: text/plain, Size: 321 bytes --]

Hi Jan,

thanks for testing it!

>Like what for example? I don't want to kill something important.

I'd start a new process, for example:

cat &

then note the process ID (on the right; if it's not shown, invoke jobs -p).

Also, could you try the attached version of /etc/init.d/guix-daemon ?

Thanks!



[-- Attachment #1.2: guix-daemon --]
[-- Type: application/octet-stream, Size: 1665 bytes --]

#!/bin/bash
### BEGIN INIT INFO
# Provides:          guix-daemon
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Guix build daemon
# Description:       Provides a daemon that does builds for Guix
### END INIT INFO

set -e
mkdir -p "/var/run"
if [ ! -f "/var/guix/profiles/per-user/root/current-guix/bin/guix-daemon" ]
then
  exit 5
fi

case "$1" in
start)
  if [ -f "/var/run/guix-daemon.pid" ]
  then
    if pgrep -F "/var/run/guix-daemon.pid" guix-daemon
    then
      exit 0
    else
      echo "guix-daemon has a stale pid file" >&2
      exit 1
    fi
  else
    daemonize \
      -a \
      -e "/var/log/guix-daemon-stderr.log" \
      -o "/var/log/guix-daemon-stdout.log" \
      -E GUIX_LOCPATH=/var/guix/profiles/per-user/root/guix-profile/lib/locale \
      -E LC_ALL=en_US.utf8 \
      -p "/var/run/guix-daemon.pid" \
      /var/guix/profiles/per-user/root/current-guix/bin/guix-daemon \
      --build-users-group=guixbuild
  fi
  ;;
stop)
  if [ -f "/var/run/guix-daemon.pid" ]
  then
    pkill -F "/var/run/guix-daemon.pid" guix-daemon || {
      exit 1
    }
    exit 0
  else
    exit 0
  fi
  ;;
status)
  if [ -f "/var/run/guix-daemon.pid" ]
  then
    if pgrep -F "/var/run/guix-daemon.pid" guix-daemon
    then
      echo "guix-daemon is running"
      exit 0
    else
      echo "guix-daemon has a stale pid file"
      exit 1
    fi
  else
    echo "guix-daemon is not running"
    exit 3
  fi
  ;;
restart)
force-reload)
  "$0" stop
  "$0" start
  ;;
*)
  echo "Usage: $0 (start|stop|status|restart|force-reload)"
  exit 3
  ;;
esac

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Install script supporting sysV init?
  2020-01-28 22:58             ` Danny Milosavljevic
@ 2020-01-28 23:07               ` Jan
  2020-01-28 23:19                 ` Danny Milosavljevic
  0 siblings, 1 reply; 15+ messages in thread
From: Jan @ 2020-01-28 23:07 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: guix-devel

On Tue, 28 Jan 2020 23:58:47 +0100
Danny Milosavljevic <dannym@scratchpost.org> wrote:

> Hi Jan,
> 
> thanks for testing it!
> 
> 
> I'd start a new process, for example:
> 
> cat &
> 
> then note the process ID (on the right; if it's not shown, invoke
> jobs -p).
Ah, right, forgot it's that easy.

> Also, could you try the attached version of /etc/init.d/guix-daemon ?
That's what I tried. Strange thing is now I can't start it again *at
all*, or at least guix can't connect to the socket. I removed the pid
file from /var/lock, could this be a problem, since I use the latest
version? I'll try good old restarting my computer.

> Thanks!
> 
> 



Jan Wielkiewicz

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Install script supporting sysV init?
  2020-01-28 23:07               ` Jan
@ 2020-01-28 23:19                 ` Danny Milosavljevic
  2020-01-30 14:11                   ` Jan
  0 siblings, 1 reply; 15+ messages in thread
From: Danny Milosavljevic @ 2020-01-28 23:19 UTC (permalink / raw)
  To: Jan; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 234 bytes --]

I've moved the pid file from /var/lock to /var/run in some version.

It's possible that I broke it now, sorry.

If you want, you can add "set -x" somewhere in the init script and from that point on it will print what it's doing.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Install script supporting sysV init?
  2020-01-28 23:19                 ` Danny Milosavljevic
@ 2020-01-30 14:11                   ` Jan
  0 siblings, 0 replies; 15+ messages in thread
From: Jan @ 2020-01-30 14:11 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: guix-devel

I made some more tests and it turns out the start procedure doesn't
work when ran manually - only the first time, the system boots,
guix-daemon is started, but if stopped, then you can't turn it on again
in the session.

Also why in the stop procedure, we kill the process two times?
 kill "${pid}"
 sleep 10
 kill -9 "${pid}" || true

In my opinion after waiting for 10 seconds, there should be a
conditional checking if the process still exists, to prevent throwing
error.

And one of the procedures restart or force-reload caused error, because
it was empty, so I copied contents of one of these into another like
this:

restart)
  "$0" stop
  "$0" start
  ;;
force-reload)
  "$0" stop
  "$0" start
  ;;


Jan Wielkiewicz

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Install script supporting sysV init?
  2020-01-26 22:02 Install script supporting sysV init? Jan
  2020-01-26 22:38 ` Danny Milosavljevic
@ 2020-02-05 19:44 ` Joshua Branson
  2020-02-05 20:10   ` Jan
  1 sibling, 1 reply; 15+ messages in thread
From: Joshua Branson @ 2020-02-05 19:44 UTC (permalink / raw)
  To: Jan; +Cc: guix-devel


I've got an old ThinkPad T400.  The motherboard supports 8GB of RAM.  I
think I bought it off of ebay for $50-80.  Does your old thinkpad's
motherboard support more RAM?

--
Joshua Branson
Sent from Emacs and Gnus

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Install script supporting sysV init?
  2020-02-05 19:44 ` Joshua Branson
@ 2020-02-05 20:10   ` Jan
  0 siblings, 0 replies; 15+ messages in thread
From: Jan @ 2020-02-05 20:10 UTC (permalink / raw)
  To: Joshua Branson; +Cc: guix-devel

On Wed, 05 Feb 2020 14:44:28 -0500
Joshua Branson <jbranso@dismail.de> wrote:

> I've got an old ThinkPad T400.  The motherboard supports 8GB of RAM.
> I think I bought it off of ebay for $50-80.  Does your old thinkpad's
> motherboard support more RAM?
You mean a new Thinkpad T400, mine is T60 and supports max 3GB RAM :)
> --
> Joshua Branson
> Sent from Emacs and Gnus


Jan Wielkiewicz

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2020-02-05 20:10 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-26 22:02 Install script supporting sysV init? Jan
2020-01-26 22:38 ` Danny Milosavljevic
2020-01-27 16:09   ` Jan
2020-01-27 18:05     ` Julien Lepiller
2020-01-28 13:06       ` Jan
2020-01-28 14:52         ` Danny Milosavljevic
2020-01-28 15:25           ` Danny Milosavljevic
2020-01-28 22:54           ` Jan
2020-01-28 22:58             ` Danny Milosavljevic
2020-01-28 23:07               ` Jan
2020-01-28 23:19                 ` Danny Milosavljevic
2020-01-30 14:11                   ` Jan
2020-01-28 10:34   ` Ludovic Courtès
2020-02-05 19:44 ` Joshua Branson
2020-02-05 20:10   ` Jan

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).