Re: question about rc.local

2023-03-11 Thread p...@ymail.ne.jp




Richard Hector wrote:
Thunderbird? Works on Debian as well, so you can keep using it when you 
upgrade 


second on thunderbird. where you can quote the specified messages and reply.

regards
Yong



Re: question about rc.local

2023-03-11 Thread Vincent Lefevre
On 2023-03-11 10:22:15 +0900, John Crawley wrote:
> On 11/03/2023 00:29, Vincent Lefevre wrote:
> > Moreover, the above path
> >/usr/lib/systemd/system/rc-local.service.d/debian.conf
> > is incorrect. This should be
> >/lib/systemd/system/rc-local.service.d/debian.conf
> 
> On recent Debian systems (certainly from Bookworm) /lib is a symlink to 
> /usr/lib so the canonical path is 
> /usr/lib/systemd/system/rc-local.service.d/debian.conf
> https://wiki.debian.org/UsrMerge

The canonical path is the one stored in the package, and this is
"/lib/systemd/system/rc-local.service.d/debian.conf".

Anyway, the initial mail message was also giving
"/lib/systemd/system/rc-local.service" (without /usr).
For consistency, it is best to consider only /lib or only /usr/lib.
There is no reason to mix both (even if only in comments).

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



Re: question about rc.local

2023-03-11 Thread Richard Hector

On 10/03/23 15:16, Corey Hickman wrote:



On Fri, Mar 10, 2023 at 9:44 AM > wrote:




I'm much happier with a "real" email client.




what real email client do you use? :)
I am using Mac as the regular desktop, Mac's Mail App is hard to use.
Though my server is debian system.


Thunderbird? Works on Debian as well, so you can keep using it when you 
upgrade :-)


Cheers,
Richard





Re: question about rc.local

2023-03-10 Thread David Wright
On Fri 10 Mar 2023 at 23:21:57 (-0500), Greg Wooledge wrote:
> On Sat, Mar 11, 2023 at 10:20:04AM +0800, cor...@free.fr wrote:
> > Is rc.local a regular service? I was thinking it's just a shell script run
> > by systemd.
> 
> rc-local.service is a systemd service.  It's enabled by default.
> 
> /etc/rc.local is the program that it will execute, if you create it and
> make it a functioning executable file.  It's traditionally a shell script,
> but that's up to you.
> 
> For more details, see "systemctl cat rc-local.service".

What goes around comes around:

https://lists.debian.org/debian-user/1999/03/msg01149.html

Cheers,
David.



Re: question about rc.local

2023-03-10 Thread Greg Wooledge
On Sat, Mar 11, 2023 at 10:20:04AM +0800, cor...@free.fr wrote:
> Is rc.local a regular service? I was thinking it's just a shell script run
> by systemd.

rc-local.service is a systemd service.  It's enabled by default.

/etc/rc.local is the program that it will execute, if you create it and
make it a functioning executable file.  It's traditionally a shell script,
but that's up to you.

For more details, see "systemctl cat rc-local.service".



Re: question about rc.local

2023-03-10 Thread davidson

On Fri, 10 Mar 2023 David Wright wrote:

On Fri 10 Mar 2023 at 18:47:02 (+0100), Vincent Lefevre wrote:

On 2023-03-10 18:00:41 +0100, Christoph Brinkhaus wrote:

Am Fri, Mar 10, 2023 at 04:29:34PM +0100 schrieb Vincent Lefevre:

On 2023-03-10 09:58:55 -0500, Greg Wooledge wrote:

On Fri, Mar 10, 2023 at 04:55:03PM +0200, Anssi Saari wrote:

Nicolas George  writes:


[snip - almost everything]


The man pages are most likely from upstream, and don't include the
changes provided by Debian (in debian.conf).


It would be useful to have the man page patched (as sometimes done),
otherwise the user could be surprised.


I assume you read the man pages in French language?


No, in English, as usual (my whole system is in English, mainly to
avoid translations, and this is also better for bug reports).

The rc-local.service(8) man page says:


 $ man rc-local.service
 No manual entry for rc-local.service
 $ apt-file find rc-local.service
 systemd: /lib/systemd/system/rc-local.service
 systemd: /lib/systemd/system/rc-local.service.d/debian.conf
 $ dpkg -L systemd | grep rc-local
 /lib/systemd/system/rc-local.service
 /lib/systemd/system/rc-local.service.d
 /lib/systemd/system/rc-local.service.d/debian.conf
 /lib/systemd/system-generators/systemd-rc-local-generator
 /usr/share/man/man8/systemd-rc-local-generator.8.gz
 $ man systemd-rc-local-generator | grep network
run after network.target, but in parallel with most other regular 
system services.
 $ cat /etc/debian_version
 11.6
 $

What am I missing?


I surmise you are missing Bookworm. Compare:

  https://packages.debian.org/bullseye/amd64/systemd/filelist
  https://packages.debian.org/bookworm/amd64/systemd/filelist

--
Ce qui est important est rarement urgent
et ce qui est urgent est rarement important
-- Dwight David Eisenhower



Re: question about rc.local

2023-03-10 Thread coreyh

On 11/03/2023 10:04, David Wright wrote:

On Fri 10 Mar 2023 at 18:47:02 (+0100), Vincent Lefevre wrote:

On 2023-03-10 18:00:41 +0100, Christoph Brinkhaus wrote:
> Am Fri, Mar 10, 2023 at 04:29:34PM +0100 schrieb Vincent Lefevre:
> > On 2023-03-10 09:58:55 -0500, Greg Wooledge wrote:
> > > On Fri, Mar 10, 2023 at 04:55:03PM +0200, Anssi Saari wrote:
> > > > Nicolas George  writes:
>
> [snip - almost everything]
>
> > > The man pages are most likely from upstream, and don't include the
> > > changes provided by Debian (in debian.conf).
> >
> > It would be useful to have the man page patched (as sometimes done),
> > otherwise the user could be surprised.
>
> I assume you read the man pages in French language?

No, in English, as usual (my whole system is in English, mainly to
avoid translations, and this is also better for bug reports).

The rc-local.service(8) man page says:


  $ man rc-local.service
  No manual entry for rc-local.service
  $ apt-file find rc-local.service
  systemd: /lib/systemd/system/rc-local.service
  systemd: /lib/systemd/system/rc-local.service.d/debian.conf




Is rc.local a regular service? I was thinking it's just a shell script 
run by systemd.


regards,
Corey H



Re: question about rc.local

2023-03-10 Thread David Wright
On Fri 10 Mar 2023 at 18:47:02 (+0100), Vincent Lefevre wrote:
> On 2023-03-10 18:00:41 +0100, Christoph Brinkhaus wrote:
> > Am Fri, Mar 10, 2023 at 04:29:34PM +0100 schrieb Vincent Lefevre:
> > > On 2023-03-10 09:58:55 -0500, Greg Wooledge wrote:
> > > > On Fri, Mar 10, 2023 at 04:55:03PM +0200, Anssi Saari wrote:
> > > > > Nicolas George  writes:
> > 
> > [snip - almost everything]
> > 
> > > > The man pages are most likely from upstream, and don't include the
> > > > changes provided by Debian (in debian.conf).
> > > 
> > > It would be useful to have the man page patched (as sometimes done),
> > > otherwise the user could be surprised.
> > 
> > I assume you read the man pages in French language?
> 
> No, in English, as usual (my whole system is in English, mainly to
> avoid translations, and this is also better for bug reports).
> 
> The rc-local.service(8) man page says:

  $ man rc-local.service
  No manual entry for rc-local.service
  $ apt-file find rc-local.service
  systemd: /lib/systemd/system/rc-local.service
  systemd: /lib/systemd/system/rc-local.service.d/debian.conf
  $ dpkg -L systemd | grep rc-local
  /lib/systemd/system/rc-local.service
  /lib/systemd/system/rc-local.service.d
  /lib/systemd/system/rc-local.service.d/debian.conf
  /lib/systemd/system-generators/systemd-rc-local-generator
  /usr/share/man/man8/systemd-rc-local-generator.8.gz
  $ man systemd-rc-local-generator | grep network
 run after network.target, but in parallel with most other regular 
system services.
  $ cat /etc/debian_version 
  11.6
  $ 

What am I missing?

>   Also note that rc-local.service is ordered after network.target, which
>   does not mean that the network is functional, see systemd.special(7).
>   If the script requires a configured network connection, it may be
>   desirable to pull in and order it after network-online.target with a
>   drop-in:
> 
>  # /etc/systemd/system/rc-local.service.d/network.conf
>  [Unit]
>  Wants=network-online.target
>  After=network-online.target
> 
> "After=network-online.target" is actually what
> /lib/systemd/system/rc-local.service.d/debian.conf does.
> So the user may be surprised that /etc/rc.local is not run
> earlier enough (or not run at all if the network is down
> when the machine is booted?).

Cheers,
David.



Re: question about rc.local

2023-03-10 Thread John Crawley

On 11/03/2023 00:29, Vincent Lefevre wrote:

On 2023-03-10 09:58:55 -0500, Greg Wooledge wrote:

On Fri, Mar 10, 2023 at 04:55:03PM +0200, Anssi Saari wrote:

Nicolas George  writes:


Anssi Saari (12023-03-09):
After=network.target

# /usr/lib/systemd/system/rc-local.service.d/debian.conf
[Unit]
# not specified by LSB, but has been behaving that way in Debian under SysV
# init and upstart
After=network-online.target


True, I only checked the man page which doesn't mention
network-online.target, only network.target.


The man pages are most likely from upstream, and don't include the
changes provided by Debian (in debian.conf).


It would be useful to have the man page patched (as sometimes done),
otherwise the user could be surprised.

Moreover, the above path
   /usr/lib/systemd/system/rc-local.service.d/debian.conf
is incorrect. This should be
   /lib/systemd/system/rc-local.service.d/debian.conf


On recent Debian systems (certainly from Bookworm) /lib is a symlink to 
/usr/lib so the canonical path is 
/usr/lib/systemd/system/rc-local.service.d/debian.conf
https://wiki.debian.org/UsrMerge
 
--

John



Re: question about rc.local

2023-03-10 Thread Vincent Lefevre
On 2023-03-10 18:00:41 +0100, Christoph Brinkhaus wrote:
> Am Fri, Mar 10, 2023 at 04:29:34PM +0100 schrieb Vincent Lefevre:
> 
> Bonjour Vincent,
> 
> > On 2023-03-10 09:58:55 -0500, Greg Wooledge wrote:
> > > On Fri, Mar 10, 2023 at 04:55:03PM +0200, Anssi Saari wrote:
> > > > Nicolas George  writes:
> 
> [snip - almost everything]
> 
> > > The man pages are most likely from upstream, and don't include the
> > > changes provided by Debian (in debian.conf).
> > 
> > It would be useful to have the man page patched (as sometimes done),
> > otherwise the user could be surprised.
> 
> I assume you read the man pages in French language?

No, in English, as usual (my whole system is in English, mainly to
avoid translations, and this is also better for bug reports).

The rc-local.service(8) man page says:

  Also note that rc-local.service is ordered after network.target, which
  does not mean that the network is functional, see systemd.special(7).
  If the script requires a configured network connection, it may be
  desirable to pull in and order it after network-online.target with a
  drop-in:

 # /etc/systemd/system/rc-local.service.d/network.conf
 [Unit]
 Wants=network-online.target
 After=network-online.target

"After=network-online.target" is actually what
/lib/systemd/system/rc-local.service.d/debian.conf does.
So the user may be surprised that /etc/rc.local is not run
earlier enough (or not run at all if the network is down
when the machine is booted?).

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



Re: question about rc.local

2023-03-10 Thread Christoph Brinkhaus
Am Fri, Mar 10, 2023 at 04:29:34PM +0100 schrieb Vincent Lefevre:

Bonjour Vincent,

> On 2023-03-10 09:58:55 -0500, Greg Wooledge wrote:
> > On Fri, Mar 10, 2023 at 04:55:03PM +0200, Anssi Saari wrote:
> > > Nicolas George  writes:

[snip - almost everything]

> > The man pages are most likely from upstream, and don't include the
> > changes provided by Debian (in debian.conf).
> 
> It would be useful to have the man page patched (as sometimes done),
> otherwise the user could be surprised.

I assume you read the man pages in French language?
I have observed a lag between the English man pages
and the localised ones. To compare just read for example

man LANG=en interfaces

May be you know that already :-) Then forget the post.
It has been a surprise for me.

Kind regards,
Christoph
-- 
Ist die Katze gesund
schmeckt sie dem Hund.



Re: question about rc.local

2023-03-10 Thread Vincent Lefevre
On 2023-03-10 09:58:55 -0500, Greg Wooledge wrote:
> On Fri, Mar 10, 2023 at 04:55:03PM +0200, Anssi Saari wrote:
> > Nicolas George  writes:
> > 
> > > Anssi Saari (12023-03-09):
> > >> Perhaps a note, since today in Debian by default it's systemd which runs
> > >> /etc/rc.local. There's no guarantee it's done last like there was in SysV
> > >> init since systemd runs stuff in parallel. Network availability also
> > >> isn't guaranteed. See man systemd-rc-local-generator.
> > >
> > > Maybe check facts before posting:
> > >
> > > # /lib/systemd/system/rc-local.service
> > > …
> > > After=network.target
> > >
> > > # /usr/lib/systemd/system/rc-local.service.d/debian.conf
> > > [Unit]
> > > # not specified by LSB, but has been behaving that way in Debian under 
> > > SysV
> > > # init and upstart
> > > After=network-online.target
> > 
> > True, I only checked the man page which doesn't mention
> > network-online.target, only network.target.
> 
> The man pages are most likely from upstream, and don't include the
> changes provided by Debian (in debian.conf).

It would be useful to have the man page patched (as sometimes done),
otherwise the user could be surprised.

Moreover, the above path
  /usr/lib/systemd/system/rc-local.service.d/debian.conf
is incorrect. This should be
  /lib/systemd/system/rc-local.service.d/debian.conf

cventin:~> apt-file search rc-local.service.d
systemd: /lib/systemd/system/rc-local.service.d/debian.conf

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



Re: question about rc.local

2023-03-10 Thread Greg Wooledge
On Fri, Mar 10, 2023 at 04:55:03PM +0200, Anssi Saari wrote:
> Nicolas George  writes:
> 
> > Anssi Saari (12023-03-09):
> >> Perhaps a note, since today in Debian by default it's systemd which runs
> >> /etc/rc.local. There's no guarantee it's done last like there was in SysV
> >> init since systemd runs stuff in parallel. Network availability also
> >> isn't guaranteed. See man systemd-rc-local-generator.
> >
> > Maybe check facts before posting:
> >
> > # /lib/systemd/system/rc-local.service
> > …
> > After=network.target
> >
> > # /usr/lib/systemd/system/rc-local.service.d/debian.conf
> > [Unit]
> > # not specified by LSB, but has been behaving that way in Debian under SysV
> > # init and upstart
> > After=network-online.target
> 
> True, I only checked the man page which doesn't mention
> network-online.target, only network.target.

The man pages are most likely from upstream, and don't include the
changes provided by Debian (in debian.conf).



Re: question about rc.local

2023-03-10 Thread Anssi Saari
Nicolas George  writes:

> Anssi Saari (12023-03-09):
>> Perhaps a note, since today in Debian by default it's systemd which runs
>> /etc/rc.local. There's no guarantee it's done last like there was in SysV
>> init since systemd runs stuff in parallel. Network availability also
>> isn't guaranteed. See man systemd-rc-local-generator.
>
> Maybe check facts before posting:
>
> # /lib/systemd/system/rc-local.service
> …
> After=network.target
>
> # /usr/lib/systemd/system/rc-local.service.d/debian.conf
> [Unit]
> # not specified by LSB, but has been behaving that way in Debian under SysV
> # init and upstart
> After=network-online.target

True, I only checked the man page which doesn't mention
network-online.target, only network.target.



Re: KMail3 (was: question about rc.local)

2023-03-09 Thread Felix Miata
rhkramer@... composed on 2023-03-09 23:24 (UTC-0500):

> I use kmail, the version that comes with kde3.  I  don't know if there is a 
> way to use that on a Mac.

My Mac has TDE, the KDE3 fork of over a dozen years ago, which does provide 
KMail,
but I don't do mail on it, or KMail on anything.
-- 
Evolution as taught in public schools is, like religion,
based on faith, not based on science.

 Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!

Felix Miata



Re: question about rc.local

2023-03-09 Thread Charles Curley
On Thu, 9 Mar 2023 20:44:43 -0500
rhkra...@gmail.com wrote:

> (1) I rarely use the gmail webmail client, but (2) when I do, it is
> not easy to bottom post, from memory, what I do is click on the place
> near the bottom of a message that inserts the previous message (or,
> at least shows it), then I intersperse my reply within that as
> appropriate (and delete what is inappropriate).
> 
> I'm much happier with a "real" email client.

You might try claws-mail. It lets you select some text in an email.
Then, when you hit "reply", you get only that text in your response
email. That makes it easy to get rid of cruft.

Claws-mail also places the cursor after the last paragraph of
the quoted material.

-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/



Re: question about rc.local

2023-03-09 Thread rhkramer
On Thursday, March 09, 2023 09:16:18 PM Corey Hickman wrote:
> On Fri, Mar 10, 2023 at 9:44 AM  wrote:
> > I'm much happier with a "real" email client.
> 
> what real email client do you use? :)
> I am using Mac as the regular desktop, Mac's Mail App is hard to use.
> Though my server is debian system.

I use kmail, the version that comes with kde3.  I  don't know if there is a 
way to use that on a Mac.

-- 
rhk 

(sig revised 20230224 -- added first paragraph)

| You do not have my permission to use this email to train an AI. 

If you reply: snip, snip, and snip again; leave attributions; avoid HTML; 
avoid top posting; and keep it "on list".  (Oxford comma (and semi-colon) 
included at no charge.)  If you revise the topic, change the Subject: line.  
If you change the topic, start a new thread.

Writing is often meant for others to read and understand (legal documents 
excepted?) -- make it easier for your reader by various means, including 
liberal use of whitespace (short paragraphs, separated by whitespace / blank 
lines) and minimal use of (obscure?) jargon, abbreviations, acronyms, and 
references.

If someone has already responded to a question, decide whether any response 
you add will be helpful or not ...

A picture is worth a thousand words.  A video (or "audio"): not so much -- 
divide by 10 for each minute of video (or audio) or create a transcript and 
edit it to 10% of the original.

A speaker who uses ahhs, ums, or such may have a real physical or mental 
disability, or may be showing disrespect for his listeners by not properly 
preparing in advance and thinking before speaking.  (Remember Cicero who did 
not have enough time to write a short missive.)  (That speaker might have been 
"trained" to do this by being interrupted often if he pauses.)

A radio (or TV) station which broadcasts speakers with high pitched voices (or 
very low pitched / gravelly voices) (which older people might not be able to 
hear properly) disrespects its listeners.   Likewise if it broadcasts 
extraneous or disturbing sounds (like gunfire or crying), or broadcasts 
speakers using their native language (with or without an overdubbed 
translation).

A person who writes a sig this long probably has issues and disrespects (and 
offends) a large number of readers. ;-)
'



Re: question about rc.local

2023-03-09 Thread Corey Hickman
On Fri, Mar 10, 2023 at 9:44 AM  wrote:

>
>
> I'm much happier with a "real" email client.
>
>
>

what real email client do you use? :)
I am using Mac as the regular desktop, Mac's Mail App is hard to use.
Though my server is debian system.


Re: question about rc.local

2023-03-09 Thread Vincent Lefevre
On 2023-03-10 09:05:24 +0800, Corey Hickman wrote:
> I found debian 11 doesn't need to change /etc/default/rsync for rsync
> daemon starting.
> But ubuntu 22.04 should have to edit that.
> Where can I check the startup mech for these two systems?

As said in Greg's message:

  systemctl cat rsync.service

If you get nothing, then this means that systemd will use the init.d
system, in which case /etc/default/rsync is used. This would explain
what you described.

> (btw, gmail does use top-posting by default, I don't know where to change
> it.)

Do not use gmail. :-)

Seriously, you can move the cursor to avoid top-posting, and delete
unneeded quoted text.

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



Re: question about rc.local

2023-03-09 Thread rhkramer
On Thursday, March 09, 2023 08:05:24 PM Corey Hickman wrote:
> Thanks
> (btw, gmail does use top-posting by default, I don't know where to change
> it.)

(1) I rarely use the gmail webmail client, but (2) when I do, it is not easy 
to bottom post, from memory, what I do is click on the place near the bottom 
of a message that inserts the previous message (or, at least shows it), then I 
intersperse my reply within that as appropriate (and delete what is 
inappropriate).

I'm much happier with a "real" email client.

-- 
rhk 

(sig revised 20230224 -- added first paragraph)

| You do not have my permission to use this email to train an AI. 

If you reply: snip, snip, and snip again; leave attributions; avoid HTML; 
avoid top posting; and keep it "on list".  (Oxford comma (and semi-colon) 
included at no charge.)  If you revise the topic, change the Subject: line.  
If you change the topic, start a new thread.

Writing is often meant for others to read and understand (legal documents 
excepted?) -- make it easier for your reader by various means, including 
liberal use of whitespace (short paragraphs, separated by whitespace / blank 
lines) and minimal use of (obscure?) jargon, abbreviations, acronyms, and 
references.

If someone has already responded to a question, decide whether any response 
you add will be helpful or not ...

A picture is worth a thousand words.  A video (or "audio"): not so much -- 
divide by 10 for each minute of video (or audio) or create a transcript and 
edit it to 10% of the original.

A speaker who uses ahhs, ums, or such may have a real physical or mental 
disability, or may be showing disrespect for his listeners by not properly 
preparing in advance and thinking before speaking.  (Remember Cicero who did 
not have enough time to write a short missive.)  (That speaker might have been 
"trained" to do this by being interrupted often if he pauses.)

A radio (or TV) station which broadcasts speakers with high pitched voices (or 
very low pitched / gravelly voices) (which older people might not be able to 
hear properly) disrespects its listeners.   Likewise if it broadcasts 
extraneous or disturbing sounds (like gunfire or crying), or broadcasts 
speakers using their native language (with or without an overdubbed 
translation).

A person who writes a sig this long probably has issues and disrespects (and 
offends) a large number of readers. ;-)
'



Re: question about rc.local

2023-03-09 Thread Corey Hickman
Hello,

I found debian 11 doesn't need to change /etc/default/rsync for rsync
daemon starting.
But ubuntu 22.04 should have to edit that.
Where can I check the startup mech for these two systems?

Thanks
(btw, gmail does use top-posting by default, I don't know where to change
it.)


On Fri, Mar 10, 2023 at 2:10 AM Greg Wooledge  wrote:

> On Thu, Mar 09, 2023 at 05:54:40PM +0100, Nicolas George wrote:
> > Michel Verdier (12023-03-09):
> > > systemd launch init.d
> >
> > No. Check.
>
> For the record:
>
> unicorn:~$ systemctl cat rsync.service
> # /lib/systemd/system/rsync.service
> [Unit]
> Description=fast remote file copy program daemon
> ConditionPathExists=/etc/rsyncd.conf
> After=network.target
> Documentation=man:rsync(1) man:rsyncd.conf(5)
>
> [Service]
> ExecStart=/usr/bin/rsync --daemon --no-detach
> RestartSec=1
> ...
>
>
> (It does not call the init.d script.  It runs the daemon directly.)
>
>


Re: question about rc.local

2023-03-09 Thread Greg Wooledge
On Thu, Mar 09, 2023 at 05:54:40PM +0100, Nicolas George wrote:
> Michel Verdier (12023-03-09):
> > systemd launch init.d
> 
> No. Check.

For the record:

unicorn:~$ systemctl cat rsync.service
# /lib/systemd/system/rsync.service
[Unit]
Description=fast remote file copy program daemon
ConditionPathExists=/etc/rsyncd.conf
After=network.target
Documentation=man:rsync(1) man:rsyncd.conf(5)

[Service]
ExecStart=/usr/bin/rsync --daemon --no-detach
RestartSec=1
...


(It does not call the init.d script.  It runs the daemon directly.)



Re: question about rc.local

2023-03-09 Thread Michel Verdier
Le 9 mars 2023 Vincent Lefevre a écrit :

> Really?
>
> /etc/default/rsync says:
>
> # This file is only used for init.d based systems!
> # If this system uses systemd, you can specify options etc. for rsync
> # in daemon mode by copying /lib/systemd/system/rsync.service to
> # /etc/systemd/system/rsync.service and modifying the copy; add required
> # options to the ExecStart line.

Hum I check systemd script and you are right. I keep old processing and
now systemd only check rsyncd.conf. Sorry



Re: question about rc.local

2023-03-09 Thread Nicolas George
Michel Verdier (12023-03-09):
> systemd launch init.d

No. Check.

-- 
  Nicolas George


signature.asc
Description: PGP signature


Re: question about rc.local

2023-03-09 Thread Michel Verdier
Le 9 mars 2023 Vincent Lefevre a écrit :

> Really?
>
> /etc/default/rsync says:
>
> # This file is only used for init.d based systems!
> # If this system uses systemd, you can specify options etc. for rsync
> # in daemon mode by copying /lib/systemd/system/rsync.service to
> # /etc/systemd/system/rsync.service and modifying the copy; add required
> # options to the ExecStart line.

systemd launch init.d which check /etc/default/rsync for this
parameter. If you don't set it to true rsync don't start as daemon.
Even if rsyncd.conf is present.



Re: question about rc.local

2023-03-09 Thread Vincent Lefevre
On 2023-03-09 17:22:01 +0100, Michel Verdier wrote:
> Le 9 mars 2023 Greg Wooledge a écrit :
> 
> > So... apparently this service is enabled by default (I didn't touch it),
> > and simply needs one to create an /etc/rsyncd.conf file in order to make
> > it work upon the next boot.
> >
> > If you don't want to reboot, then you may need to do a
> > "systemctl start rsync.service" after creating the file.  Maybe.  I haven't
> > tested it.
> 
> Before that you need to edit /etc/default/rsync and set
> RSYNC_ENABLE=true

Really?

/etc/default/rsync says:

# This file is only used for init.d based systems!
# If this system uses systemd, you can specify options etc. for rsync
# in daemon mode by copying /lib/systemd/system/rsync.service to
# /etc/systemd/system/rsync.service and modifying the copy; add required
# options to the ExecStart line.

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



Re: question about rc.local

2023-03-09 Thread Michel Verdier
Le 9 mars 2023 Greg Wooledge a écrit :

> So... apparently this service is enabled by default (I didn't touch it),
> and simply needs one to create an /etc/rsyncd.conf file in order to make
> it work upon the next boot.
>
> If you don't want to reboot, then you may need to do a
> "systemctl start rsync.service" after creating the file.  Maybe.  I haven't
> tested it.

Before that you need to edit /etc/default/rsync and set
RSYNC_ENABLE=true



Re: question about rc.local

2023-03-09 Thread Greg Wooledge
On Thu, Mar 09, 2023 at 02:35:55PM +0100, Markus Schönhaber wrote:
> 09.03.23, 14:16 +0100, cor...@free.fr:
> > What’s the right way to run rsync —daemon then? Thanks
> 
> "The right way" is what woks best for you, I suppose.
> 
> But since Debian's rsync package installs a systemd service unit, it might
> be easiest to simply use that.

unicorn:~$ systemctl status rsync | cat
● rsync.service - fast remote file copy program daemon
 Loaded: loaded (/lib/systemd/system/rsync.service; enabled; vendor preset: 
enabled)
 Active: inactive (dead)
  Condition: start condition failed at Tue 2023-01-24 07:21:57 EST; 1 months 13 
days ago
 └─ ConditionPathExists=/etc/rsyncd.conf was not met
   Docs: man:rsync(1)
 man:rsyncd.conf(5)

So... apparently this service is enabled by default (I didn't touch it),
and simply needs one to create an /etc/rsyncd.conf file in order to make
it work upon the next boot.

If you don't want to reboot, then you may need to do a
"systemctl start rsync.service" after creating the file.  Maybe.  I haven't
tested it.



Re: question about rc.local

2023-03-09 Thread Nicolas George
Charles Curley (12023-03-09):
> Why do you want to? Normally starting rsync on the client will start it
> up on the server. No special action on the server is required.

That is true for rsync over ssh if the client has a shell account on the
server. It is not the only mode for rsync.

Regards,

-- 
  Nicolas George



Re: question about rc.local

2023-03-09 Thread Charles Curley
On Thu, 09 Mar 2023 21:16:02 +0800
cor...@free.fr wrote:

> What’s the right way to run rsync —daemon then? Thanks

Why do you want to? Normally starting rsync on the client will start it
up on the server. No special action on the server is required.

-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/



Re: question about rc.local

2023-03-09 Thread Markus Schönhaber

09.03.23, 14:16 +0100, cor...@free.fr:

Please don't top-post.


What’s the right way to run rsync —daemon then? Thanks


"The right way" is what woks best for you, I suppose.

But since Debian's rsync package installs a systemd service unit, it 
might be easiest to simply use that.


--
Regards
  mks



Re: question about rc.local

2023-03-09 Thread Nicolas George
cor...@free.fr (12023-03-09):
> What’s the right way to run rsync —daemon then? Thanks

Please do not top-post. If you do not know what it means, look it up.

Same answer as my first mail: it depends on your personal definition of
“right way”.

Note that on top of the many possibilities to start a program at boot,
for rsync you also have the option to define it as a service in inetd,
xinetd or a systemd socket.

But you should look more closely: rsync is already started automatically
if it is configured.

Regards,

-- 
  Nicolas George



Re: question about rc.local

2023-03-09 Thread Nicolas George
Anssi Saari (12023-03-09):
> Perhaps a note, since today in Debian by default it's systemd which runs
> /etc/rc.local. There's no guarantee it's done last like there was in SysV
> init since systemd runs stuff in parallel. Network availability also
> isn't guaranteed. See man systemd-rc-local-generator.

Maybe check facts before posting:

# /lib/systemd/system/rc-local.service
…
After=network.target

# /usr/lib/systemd/system/rc-local.service.d/debian.conf
[Unit]
# not specified by LSB, but has been behaving that way in Debian under SysV
# init and upstart
After=network-online.target

Regards,

-- 
  Nicolas George



Re: question about rc.local

2023-03-09 Thread coreyh

What’s the right way to run rsync —daemon then? Thanks

On 09/03/2023 21:02, Greg Wooledge wrote:

On Thu, Mar 09, 2023 at 01:32:54PM +0100, Nicolas George wrote:

Corey Hickman (12023-03-09):
> does debian 11 still use /etc/rc.local for startups after rebooting?

No, Debian does not use it. It lets you use it if you so want.


For the record, if you *do* want to use it, you'll have to create it
yourself.  Make sure you give it a proper shebang (#!/bin/sh) and +x 
bits,

or it won't work.

Older versions of Debian created a mostly empty rc.local for you to
use as a starting point, but the most recent versions (not sure how 
many)

have stopped doing that.

If the process you're trying to start is a long-running service of some
kind, which you may want to stop or restart, or which you may even want
to restart itself automatically if it dies, then you should definitely
look into creating a systemd unit instead of an rc.local hack.




Re: question about rc.local

2023-03-09 Thread Anssi Saari
Corey Hickman  writes:

> does debian 11 still use /etc/rc.local for startups after rebooting?
>
> for instance, I want to start a process after system rebooting, where should 
> I put the command?

Perhaps a note, since today in Debian by default it's systemd which runs
/etc/rc.local. There's no guarantee it's done last like there was in SysV
init since systemd runs stuff in parallel. Network availability also
isn't guaranteed. See man systemd-rc-local-generator.



Re: question about rc.local

2023-03-09 Thread Greg Wooledge
On Thu, Mar 09, 2023 at 01:32:54PM +0100, Nicolas George wrote:
> Corey Hickman (12023-03-09):
> > does debian 11 still use /etc/rc.local for startups after rebooting?
> 
> No, Debian does not use it. It lets you use it if you so want.

For the record, if you *do* want to use it, you'll have to create it
yourself.  Make sure you give it a proper shebang (#!/bin/sh) and +x bits,
or it won't work.

Older versions of Debian created a mostly empty rc.local for you to
use as a starting point, but the most recent versions (not sure how many)
have stopped doing that.

If the process you're trying to start is a long-running service of some
kind, which you may want to stop or restart, or which you may even want
to restart itself automatically if it dies, then you should definitely
look into creating a systemd unit instead of an rc.local hack.



Re: question about rc.local

2023-03-09 Thread Nicolas George
Corey Hickman (12023-03-09):
> does debian 11 still use /etc/rc.local for startups after rebooting?

No, Debian does not use it. It lets you use it if you so want.

> for instance, I want to start a process after system rebooting, where
> should I put the command?

SHOULD? It depend how cleanly you want to do things, and your personal
definition of cleanliness.

You CAN put it in rc.local.

You CAN also define a SysV init script.

You CAN also define a systemd service.

You CAN also set a @reboot crontab.

You CAN replace /sbin/init by a shell script that does what you want and
then continue booting.

This list is not exhaustive.

Regards,

-- 
  Nicolas George



question about rc.local

2023-03-09 Thread Corey Hickman
does debian 11 still use /etc/rc.local for startups after rebooting?

for instance, I want to start a process after system rebooting, where
should I put the command?

thanks & regards,
Corey H