Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

Entropy isn't what it used to be.


computers / alt.os.linux / Re: unmounting at shut down, confusing situation ...

SubjectAuthor
* unmounting at shut down, confusing situation ...MarioCPPP
+* unmounting at shut down, confusing situation ...David W. Hodgins
|`- unmounting at shut down, confusing situation ...MarioCPPP
`* unmounting at shut down, confusing situation ...MarioCPPP
 +* unmounting at shut down, confusing situation ...Carlos E.R.
 |`* unmounting at shut down, confusing situation ...MarioCPPP
 | `- unmounting at shut down, confusing situation ...Carlos E.R.
 +* unmounting at shut down, confusing situation ...Chris Elvidge
 |`* unmounting at shut down, confusing situation ...MarioCPPP
 | `* unmounting at shut down, confusing situation ...Carlos E.R.
 |  `* unmounting at shut down, confusing situation ...MarioCPPP
 |   +- unmounting at shut down, confusing situation ...J.O. Aho
 |   +- unmounting at shut down, confusing situation ...Carlos E.R.
 |   `* unmounting at shut down, confusing situation ...David W. Hodgins
 |    `* unmounting at shut down, confusing situation ...MarioCPPP
 |     +* unmounting at shut down, confusing situation ...Carlos E.R.
 |     |`* unmounting at shut down, confusing situation ...David W. Hodgins
 |     | `- unmounting at shut down, confusing situation ...Carlos E.R.
 |     +- unmounting at shut down, confusing situation ...Bit Twister
 |     `- unmounting at shut down, confusing situation ...David W. Hodgins
 `* unmounting at shut down, confusing situation ...David W. Hodgins
  `* unmounting at shut down, confusing situation ...MarioCPPP
   `* unmounting at shut down, confusing situation ...David W. Hodgins
    `* unmounting at shut down, confusing situation ...MarioCPPP
     `- unmounting at shut down, confusing situation ...David W. Hodgins

1
unmounting at shut down, confusing situation ...

<u6pqcn$23fdi$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1468&group=alt.os.linux#1468

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: NoliMihiFrangereMentulam@libero.it (MarioCPPP)
Newsgroups: alt.os.linux
Subject: unmounting at shut down, confusing situation ...
Date: Mon, 19 Jun 2023 16:57:26 +0200
Organization: A noiseless patient Spider
Lines: 70
Message-ID: <u6pqcn$23fdi$1@dont-email.me>
Reply-To: MarioCCCP@CCCP.MIR
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: base64
Injection-Date: Mon, 19 Jun 2023 14:57:27 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="799b9209eefb0deec732b22ec8aacd4a";
logging-data="2211250"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+bUNksR390+JW1b7xgnCnr"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.12.0
Cancel-Lock: sha1:IyFCpyPYtzIc7wpb6dI0ujQsTt0=
Content-Language: en-GB, it-IT
 by: MarioCPPP - Mon, 19 Jun 2023 14:57 UTC


recently, in the 3D od moving home, symlink and bind mount,
a remark from Mr D. Hodgins (which I cannot find alas)
stated that, in some situations (binding or symlinking, I
cannot recall) the UNMOUNT could fail during shutdown.
Now, It has been a long time since I have been affected by
this error, which went unnoticed or not the just importance
had been given to it, until reading the remark.
Now two of my mounted devices fail during shut down, being
deferred and slowing down all (there is also a misterious
JAVA-WRAPPER which keeps running and slows it even more, but
this one another time).
let start with LSBLK cmd output

sda 8:0 0 111,8G 0 disk
├─sda1 8:1 0 64,1G 0 part [SWAP]
├─sda2 8:2 0 15,7G 0 part /Vbox_Shared
└─sda3 8:3 0 32G 0 part /Dati
sdb 8:16 0 3,6T 0 disk
└─sdb1 8:17 0 3,6T 0 part /home
/My
sdd 8:48 0 931,5G 0 disk
└─sdd1 8:49 0 931,5G 0 part /VBox_3
sde 8:64 1 0B 0 disk
(maybe this is the USB modem router)
sr0 11:0 1 1024M 0 rom
nvme0n1 259:0 0 953,9G 0 disk
├─nvme0n1p1 259:1 0 318G 0 part /VBox_1
├─nvme0n1p2 259:2 0 317,9G 0 part /
└─nvme0n1p3 259:3 0 318G 0 part /VBox_2

now you can see how both /home and /My are associated to the
large HDD (sdb1), same partition, but /home is actually a
SUBFOLDER in that partition, while My is its "relative" root
(the topmost folder).

My as such is symlinked under / (absolute ROOT)
in /home/user there is a symlink that points to /My (it
points "outwards" somewhat ... I don't understand how can
this work actually, I see infinitive recursion here, but
since this circular inclusion is not "active", the symlink
is static, maybe it is not as when one uses #include
directive circularly).
the File Manager tracks the browing in a really amusing way
!!! (it does not simplify full circles).
Here I paste the address bar after some circular browsing in
CAJA
/home/userX/My/home/userX/My/home/userX/My/home/userX/My/home/userX
and the circular browsing is possibly unlimited.
I have come up with sth evil I fear (even if it works).
But the shut down fails to unmount.
It fails for /tmp (which is mounted in RAM as tmpfs, so why
does it complain ?). /tmp is not symlinked anywhere and it
does not symlink anything. Mistery ! But it complaints.

The circularly nested situation of the system drive
(nvme0n1p2) which contain a symlink to /My/home/userX
and of drive sdb1 (/My), which is also BIND MOUNTED to
/home, is more complex

Since I have some programs scheduled to automatically run at
startup, is it there (and how) the possibility to run some
script ad shut-down ?
I mean, some script that could unmount sth in the right
order as to fasten the closing of all, gracefully, and avoid
error messages ?

Another thing : after DELETING the old /home content in
nvme0n1p2, the FREE SPACE of the drive is still reported as
before. Why ?
The current /home correctly reports 2,1 TB free space (since
now it is on sdb1, which is large), but It does not simply
HIDE the old content, the old content has been totally
erased with the system offline, in a LIVE DISTRO.
ALSO I tried to BYPASS THE RECYCLE BIN (holding shift), so
the space should actually have been freed up (I cannot empty
the bin now that the system is up).
What could have happened ?
The disk is seen "CLEAN" at boot ...

--
1) Resistere, resistere, resistere.
2) Se tutti pagano le tasse, le tasse le pagano tutti
MarioCPPP

Re: unmounting at shut down, confusing situation ...

<op.16su9tuya3w0dxdave@hodgins.homeip.net>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1480&group=alt.os.linux#1480

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: dwhodgins@nomail.afraid.org (David W. Hodgins)
Newsgroups: alt.os.linux
Subject: Re: unmounting at shut down, confusing situation ...
Date: Mon, 19 Jun 2023 15:04:31 -0400
Organization: A noiseless patient Spider
Lines: 33
Message-ID: <op.16su9tuya3w0dxdave@hodgins.homeip.net>
References: <u6pqcn$23fdi$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="9329bade323445a87876b8885267d953";
logging-data="2263674"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+SfcWAMllUM+n0moX0+3ifbS8HCGscEvo="
User-Agent: Opera Mail/12.16 (Linux)
Cancel-Lock: sha1:u7ac/bN2h3chHkvxpJAJMPWMCT0=
 by: David W. Hodgins - Mon, 19 Jun 2023 19:04 UTC

On Mon, 19 Jun 2023 10:57:26 -0400, MarioCPPP <NoliMihiFrangereMentulam@libero.it> wrote:

>
> recently, in the 3D od moving home, symlink and bind mount,
> a remark from Mr D. Hodgins (which I cannot find alas)
> stated that, in some situations (binding or symlinking, I
> cannot recall) the UNMOUNT could fail during shutdown.

That comment was about bind mounts (or any mount with the directory used as
the mount point being in /home.

With a symlink, if it points to is a file or directory on a file system that
is not mounted, it becomes a broken symlink, until that file system is mounted
again. Attempts to access it will simply fail with file not found.

With mounts (of any type), the unmounting must be done in the right order.
A file system can not be unmounted while a directory in that file system
is in use as the mountpoint for another filesystem. That other file system
must be unmounted first.

In general, symlinks are simpler to deal with, but recursion must be avoided,
which is the problem you have described.

To debug the problem as it is currently, please install the package "tree"
if it isn't already installed. Then post the output of the following three
commands run as root ...
grep -e /dev/s -e /dev/n /proc/mounts
tree -ifal /home/|grep '>'
df

That should present the information needed in a format easier to debug.

Regards, Dave Hodgins

Re: unmounting at shut down, confusing situation ...

<u6rn0c$2d4mc$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1509&group=alt.os.linux#1509

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: NoliMihiFrangereMentulam@libero.it (MarioCPPP)
Newsgroups: alt.os.linux
Subject: Re: unmounting at shut down, confusing situation ...
Date: Tue, 20 Jun 2023 10:11:49 +0200
Organization: A noiseless patient Spider
Lines: 141
Message-ID: <u6rn0c$2d4mc$1@dont-email.me>
References: <u6pqcn$23fdi$1@dont-email.me>
<op.16su9tuya3w0dxdave@hodgins.homeip.net>
Reply-To: MarioCCCP@CCCP.MIR
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 20 Jun 2023 08:11:59 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="9463cce0664a2b2125969372578b305e";
logging-data="2527948"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18QH8WQqh2Ox0tb5D/bDN68"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.12.0
Cancel-Lock: sha1:6vr1ZcpnVkAh8g+9ENx2lutetag=
Content-Language: en-GB, it-IT
In-Reply-To: <op.16su9tuya3w0dxdave@hodgins.homeip.net>
 by: MarioCPPP - Tue, 20 Jun 2023 08:11 UTC

On 19/06/23 21:04, David W. Hodgins wrote:
> On Mon, 19 Jun 2023 10:57:26 -0400, MarioCPPP
> <NoliMihiFrangereMentulam@libero.it> wrote:
>
>>
>> recently, in the 3D od moving home, symlink and bind mount,
>> a remark from Mr D. Hodgins (which I cannot find alas)
>> stated that, in some situations (binding or symlinking, I
>> cannot recall) the UNMOUNT could fail during shutdown.
>
> That comment was about bind mounts (or any mount with the
> directory used as
> the mount point being in /home.
>
> With a symlink, if it points to is a file or directory on a
> file system that
> is not mounted, it becomes a broken symlink, until that file
> system is mounted
> again. Attempts to access it will simply fail with file not
> found.

strange .... for the problem is there (almost unnoticed)
from a long time ...

>
> With mounts (of any type), the unmounting must be done in
> the right order.
> A file system can not be unmounted while a directory in that
> file system
> is in use as the mountpoint for another filesystem. That
> other file system
> must be unmounted first.
>
> In general, symlinks are simpler to deal with, but recursion
> must be avoided,
> which is the problem you have described.
>
> To debug the problem as it is currently, please install the
> package "tree"
> if it isn't already installed. Then post the output of the
> following three
> commands run as root ...
> grep -e /dev/s -e /dev/n /proc/mounts

root@UserX:~# grep -e /dev/s -e /dev/n /proc/mounts
=========================================================
/dev/nvme0n1p2 / ext4
rw,noatime,nodiratime,errors=remount-ro 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev,inode64 0 0

/dev/sdb3 /Dati ext4 rw,noatime,nodiratime 0 0

/dev/sdb2 /Vbox_Shared ext4 rw,noatime,nodiratime 0 0

/dev/nvme0n1p3 /VBox_2 ext4 rw,noatime,nodiratime 0 0

/dev/nvme0n1p1 /VBox_1 ext4 rw,noatime,nodiratime 0 0

/dev/sdc1 /VBox_3 ext4 rw,noatime,nodiratime 0 0

/dev/sda1 /My ext4 rw,relatime 0 0

/dev/sda1 /home ext4 rw,relatime 0 0

/dev/sde1 /media/UserX/MoviesFilms fuseblk
rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096
0 0
=========================================================

> tree -ifal /home/|grep '>'

this one gives some many tens of full screen
from time to time appears the advice RECURSIVE, NOT
FOLLOWED, like in this row

/home/UserX/.local/share/flatpak/runtime/org.gnome.Sdk/x86_64/3.38/bad32130d22256ab6bcf1bb572f084be423d49a0c356ecac3cee5db8c6ba1a4d/files/share/zoneinfo
-> zoneinfo [recursive, not followed]

but the output is huge

trying to use one single command
root@UserX:~# tree -ifal /home/|grep '>' df
says
grep: df: File or directory non existing
while df alone simply shows an empty line, as it is
expecting some input (i broke it with CTRL+C)

> df
>
> That should present the information needed in a format
> easier to debug.

dunno ... I maybe made a mistake splitting or merging the
commands :(

I tried to "MAN" df command, discovering the
--human-readable flag, then doing df -h said

File system Dim. Usati Dispon. Uso% Montato su
udev 32G 0 32G 0% /dev
tmpfs 6,3G 2,0M 6,3G 1% /run
/dev/nvme0n1p2 312G 210G 71G 75% /
tmpfs 32G 632K 32G 1% /dev/shm
tmpfs 5,0M 8,0K 5,0M 1% /run/lock
/dev/sdb3 32G 373M 30G 2% /Dati
/dev/sdb2 16G 24K 15G 1% /Vbox_Shared
tmpfs 9,5G 324K 9,5G 1% /tmp
/dev/nvme0n1p3 312G 237G 60G 80% /VBox_2
/dev/nvme0n1p1 312G 220G 77G 75% /VBox_1
/dev/sdc1 916G 862G 7,7G 100% /VBox_3
/dev/sda1 3,6T 1,6T 1,9T 45% /My
tmpfs 6,3G 176K 6,3G 1% /run/user/1000
/dev/loop0 96M 22K 91M 1% /var/spool/havp
/dev/sde1 3,7T 3,2T 466G 88% /media/UserX/MoviesFilms

As I have said before, I suspect there is a problem with the
FREE SPACE with partition of ROOR (/dev/nvme0n1p2) which
still reports 210G used even if I have deleted the former
/home in it (a large 105-110 GB) and now home is attached to
/dev/sda1 (a subfolder of /My ... strangely (or maybe not),
the BIND MOUNT of /home does not appear here

in FSTAB I added the row
/My/home /home none bind 0 0
AFTER /My is just mount point for device /dev/sda1

>
> Regards, Dave Hodgins

Tnx for all the help!
ciao

--
1) Resistere, resistere, resistere.
2) Se tutti pagano le tasse, le tasse le pagano tutti
MarioCPPP

Re: unmounting at shut down, confusing situation ...

<u90km3$okpu$2@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=2060&group=alt.os.linux#2060

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: NoliMihiFrangereMentulam@libero.it (MarioCPPP)
Newsgroups: alt.os.linux
Subject: Re: unmounting at shut down, confusing situation ...
Date: Sun, 16 Jul 2023 13:35:31 +0200
Organization: A noiseless patient Spider
Lines: 99
Message-ID: <u90km3$okpu$2@dont-email.me>
References: <u6pqcn$23fdi$1@dont-email.me>
Reply-To: MarioCCCP@CCCP.MIR
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: base64
Injection-Date: Sun, 16 Jul 2023 11:35:32 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="84a58a440bf008137dd79a4aa9ddd8e3";
logging-data="807742"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+23r1i8cKcCVriSGu6ay++"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:XYK5QFp9jDbnG4LlrCjOfJ3Zsh0=
In-Reply-To: <u6pqcn$23fdi$1@dont-email.me>
Content-Language: en-GB, it-IT
 by: MarioCPPP - Sun, 16 Jul 2023 11:35 UTC

On 19/06/23 16:57, MarioCPPP wrote:
Incidentally (serendipity) I have discovered the culprit of
the long delay at shut down (and possibly also the origin of
errors in unmounting /tmp and /Data partitions.
It is the FREENET service I used to load at startup (seeding
a node of such net).
Now I have disabled it (yet, it loads all the same, and I
still have to understand why).
Anyway, the process cannot be shut down by
xfce4-taskmanager, not in plain user mode and not even,
surprisingly, in ROOT MODE !
Trying to stop / kill this FREENET daemon nothing happens.
Luckily, the installer also placed a shutdown app in the
menu, that works : using it the service vanishes from the
task manager.
I did not know some process could be survive ROOT "orders".
Maybe it operates at a lowest runlevel ?
Dunno.
The fact is : once manually shut down, the system no longer
fails to unmount partitions nor delays the restart or power off.
Now I should understand how to get the closeup program
called on system shutdown, at very early stage.
Cron/Anacron might have some utilities in this or they are
simply TIME-based and never EVENT-based ?

>
> recently, in the 3D od moving home, symlink and bind mount,
> a remark from Mr D. Hodgins (which I cannot find alas)
> stated that, in some situations (binding or symlinking, I
> cannot recall) the UNMOUNT could fail during shutdown.
>
> Now, It has been a long time since I have been affected by
> this error, which went unnoticed or not the just importance
> had been given to it, until reading the remark.
>
> Now two of my mounted devices fail during shut down, being
> deferred and slowing down all (there is also a misterious
> JAVA-WRAPPER which keeps running and slows it even more, but
> this one another time).
>
> let start with LSBLK cmd output
>
>
> sda           8:0    0 111,8G  0 disk
> ├─sda1        8:1    0  64,1G  0 part [SWAP]
> ├─sda2        8:2    0  15,7G  0 part /Vbox_Shared
> └─sda3        8:3    0    32G  0 part /Dati
>
> sdb           8:16   0   3,6T  0 disk
> └─sdb1        8:17   0   3,6T  0 part /home
>                                       /My
>
> sdd           8:48   0 931,5G  0 disk
> └─sdd1        8:49   0 931,5G  0 part /VBox_3
>
> sde           8:64   1     0B  0 disk
> (maybe this is the USB modem router)
>
> sr0          11:0    1  1024M  0 rom
>
> nvme0n1     259:0    0 953,9G  0 disk
> ├─nvme0n1p1 259:1    0   318G  0 part /VBox_1
> ├─nvme0n1p2 259:2    0 317,9G  0 part /
> └─nvme0n1p3 259:3    0   318G  0 part /VBox_2
>
>
> now you can see how both /home and /My are associated to the
> large HDD (sdb1), same partition, but /home is actually a
> SUBFOLDER in that partition, while My is its "relative" root
> (the topmost folder).
>
>
> My as such is symlinked under / (absolute ROOT)
>
> in /home/user  there is a symlink that points to /My (it
> points "outwards" somewhat ... I don't understand how can
> this work actually, I see infinitive recursion here, but
> since this circular inclusion is not "active", the symlink
> is static, maybe it is not as when one uses #include
> directive circularly).
>
> the File Manager tracks the browing in a really amusing way
> !!! (it does not simplify full circles).
> Here I paste the address bar after some circular browsing in
> CAJA
>
> /home/userX/My/home/userX/My/home/userX/My/home/userX/My/home/userX
>
> and the circular browsing is possibly unlimited.
>
> I have come up with sth evil  I fear (even if it works).
> But the shut down fails to unmount.
> It fails for /tmp (which is mounted in RAM as tmpfs, so why
> does it complain ?). /tmp is not symlinked anywhere and it
> does not symlink anything. Mistery ! But it complaints.
>
>
> The circularly nested situation of the system drive
> (nvme0n1p2)  which contain a symlink to /My/home/userX
>
> and of drive sdb1 (/My), which is also BIND MOUNTED to
> /home, is more complex
>
>
> Since I have some programs scheduled to automatically run at
> startup, is it there (and how) the possibility to run some
> script ad shut-down ?
>
> I mean, some script that could unmount sth in the right
> order as to fasten the closing of all, gracefully, and avoid
> error messages ?
>
>
>
> Another thing : after DELETING the old /home content in
> nvme0n1p2, the FREE SPACE of the drive is still reported as
> before. Why ?
> The current /home correctly reports 2,1 TB free space (since
> now it is on sdb1, which is large), but It does not simply
> HIDE the old content, the old content has been totally
> erased with the system offline, in a LIVE DISTRO.
> ALSO I tried to BYPASS THE RECYCLE BIN (holding shift), so
> the space should actually have been freed up (I cannot empty
> the bin now that the system is up).
> What could have happened ?
> The disk is seen "CLEAN" at boot ...
>
>
>
--
1) Resistere, resistere, resistere.
2) Se tutti pagano le tasse, le tasse le pagano tutti
MarioCPPP

Re: unmounting at shut down, confusing situation ...

<pc3dojx4c2.ln2@Telcontar.valinor>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=2061&group=alt.os.linux#2061

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: robin_listas@es.invalid (Carlos E.R.)
Newsgroups: alt.os.linux
Subject: Re: unmounting at shut down, confusing situation ...
Date: Sun, 16 Jul 2023 14:11:37 +0200
Lines: 83
Message-ID: <pc3dojx4c2.ln2@Telcontar.valinor>
References: <u6pqcn$23fdi$1@dont-email.me> <u90km3$okpu$2@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net XRDPFTqeoAeGhLxokLYLwgflLLXxBGkg3HiY3QQ5RBdrowYp3W
X-Orig-Path: Telcontar.valinor!not-for-mail
Cancel-Lock: sha1:4Qiht/CXe5RW+LD8PYv+dRox3qo= sha256:wdlj+Wa2qqzNebv6J9BTXLoEF7bkZeRS94eXBrjVRTw=
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.9.1
Content-Language: es-ES, en-CA
In-Reply-To: <u90km3$okpu$2@dont-email.me>
 by: Carlos E.R. - Sun, 16 Jul 2023 12:11 UTC

On 2023-07-16 13:35, MarioCPPP wrote:
> On 19/06/23 16:57, MarioCPPP wrote:
>
> Incidentally (serendipity) I have discovered the culprit of the long
> delay at shut down (and possibly also the origin of errors in unmounting
> /tmp and /Data partitions.
>
> It is the FREENET service I used to load at startup (seeding a node of
> such net).
> Now I have disabled it (yet, it loads all the same, and I still have to
> understand why).
>
> Anyway, the process cannot be shut down by
> xfce4-taskmanager, not in plain user mode and not even, surprisingly, in
> ROOT MODE !
> Trying to stop / kill this FREENET daemon nothing happens.
> Luckily, the installer also placed a shutdown app in the menu, that
> works : using it the service vanishes from the task manager.
> I did not know some process could be survive ROOT "orders". Maybe it
> operates at a lowest runlevel ?

No, but if it is waiting on I/O, it can not be killed. Well, it can, but
it doesn't disappear.

> Dunno.
> The fact is : once manually shut down, the system no longer fails to
> unmount partitions nor delays the restart or power off.
>
> Now I should understand how to get the closeup program called on system
> shutdown, at very early stage.
>
> Cron/Anacron might have some utilities in this or they are simply
> TIME-based and never EVENT-based ?

Event based means using systemd.

On halt, the system you calls the clause for shutdown of the daemon.
Killing it is a last resource.

Example:
/etc/systemd/system/network.service:

ExecStart=/usr/sbin/wicked --systemd ifup all
ExecStop=/usr/sbin/wicked --systemd ifdown all
ExecReload=/usr/sbin/wicked --systemd ifreload all

With initd scripts, there is of course an equivalent method. Example:

/etc/init.d/nscd.rpmsave:

case "$1" in
start)
echo -n "Starting Name Service Cache Daemon"
/sbin/startproc -p $NSCD_PID $NSCD_BIN
rc_status -v
;;
stop)
echo -n "Shutting down Name Service Cache Daemon"
/sbin/killproc -p $NSCD_PID -TERM $NSCD_BIN
# if nscd does not run as root, it cannot remove this files:
rm -f /var/run/nscd/socket $NSCD_PID
rc_status -v
;;
try-restart|condrestart)
;;
....
restart)
;;
....

esac

--
Cheers, Carlos.

Re: unmounting at shut down, confusing situation ...

<u90nbc$p0bi$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=2062&group=alt.os.linux#2062

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!news.chmurka.net!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chris@mshome.net (Chris Elvidge)
Newsgroups: alt.os.linux
Subject: Re: unmounting at shut down, confusing situation ...
Date: Sun, 16 Jul 2023 13:20:59 +0100
Organization: A noiseless patient Spider
Lines: 32
Message-ID: <u90nbc$p0bi$1@dont-email.me>
References: <u6pqcn$23fdi$1@dont-email.me> <u90km3$okpu$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 16 Jul 2023 12:21:00 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="ae812a81421375aa760d5b6864e04406";
logging-data="819570"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+PDeHHTO6el8+2oq+BiHHkE8OKHNwTj1k="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
Thunderbird/52.2.1 Lightning/5.4
Cancel-Lock: sha1:OO4pbyW6w6TGE5seksMe5hEkcpU=
In-Reply-To: <u90km3$okpu$2@dont-email.me>
Content-Language: en-GB
 by: Chris Elvidge - Sun, 16 Jul 2023 12:20 UTC

On 16/07/2023 12:35, MarioCPPP wrote:
> On 19/06/23 16:57, MarioCPPP wrote:
>
> Incidentally (serendipity) I have discovered the culprit of the long
> delay at shut down (and possibly also the origin of errors in unmounting
> /tmp and /Data partitions.
>
> It is the FREENET service I used to load at startup (seeding a node of
> such net).
> Now I have disabled it (yet, it loads all the same, and I still have to
> understand why).
>
> Anyway, the process cannot be shut down by
> xfce4-taskmanager, not in plain user mode and not even, surprisingly, in
> ROOT MODE !
> Trying to stop / kill this FREENET daemon nothing happens.
> Luckily, the installer also placed a shutdown app in the menu, that
> works : using it the service vanishes from the task manager.
> I did not know some process could be survive ROOT "orders". Maybe it
> operates at a lowest runlevel ?

A suggestion: Find out what the "shutdown app" actually runs and put
that in /etc/rc.local_shutdown (or /etc/rc.d/rc.local_shutdown,
depending on where rc.local actually is). Make sure rc.local_shutdown is
executable.

--

Chris Elvidge, England
NEXT TIME IT COULD BE ME ON THE SCAFFOLDING

Re: unmounting at shut down, confusing situation ...

<op.176pszcta3w0dxdave@hodgins.homeip.net>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=2063&group=alt.os.linux#2063

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: dwhodgins@nomail.afraid.org (David W. Hodgins)
Newsgroups: alt.os.linux
Subject: Re: unmounting at shut down, confusing situation ...
Date: Sun, 16 Jul 2023 13:06:25 -0400
Organization: A noiseless patient Spider
Lines: 46
Message-ID: <op.176pszcta3w0dxdave@hodgins.homeip.net>
References: <u6pqcn$23fdi$1@dont-email.me> <u90km3$okpu$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="64674e09fd6b5b2ec1c0d0ad7127b4c9";
logging-data="877789"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+WQCliRPP3fq3T7OoRe3cJoC5raN3hMwE="
User-Agent: Opera Mail/12.16 (Linux)
Cancel-Lock: sha1:iORuU5v36ltIbA/uUOycIZ15wBg=
 by: David W. Hodgins - Sun, 16 Jul 2023 17:06 UTC

On Sun, 16 Jul 2023 07:35:31 -0400, MarioCPPP <NoliMihiFrangereMentulam@libero.it> wrote:

> On 19/06/23 16:57, MarioCPPP wrote:
>
> Incidentally (serendipity) I have discovered the culprit of
> the long delay at shut down (and possibly also the origin of
> errors in unmounting /tmp and /Data partitions.
>
> It is the FREENET service I used to load at startup (seeding
> a node of such net).
> Now I have disabled it (yet, it loads all the same, and I
> still have to understand why).
>
> Anyway, the process cannot be shut down by
> xfce4-taskmanager, not in plain user mode and not even,
> surprisingly, in ROOT MODE !
> Trying to stop / kill this FREENET daemon nothing happens.
> Luckily, the installer also placed a shutdown app in the
> menu, that works : using it the service vanishes from the
> task manager.
> I did not know some process could be survive ROOT "orders".
> Maybe it operates at a lowest runlevel ?

When you kill a process, normally it sends signal 15, aka SIGTERM to the
process telling it to terminate. The process then closes files and exits,
or can just ignore the signal.

To force a process to exit, you can use signal 9, aka SIGKILL which tells
the kernel to end the process. The process does not get a chance to flush
it's buffers or do any other cleanup so files may end up corrupted.

If a process is stuck in a device wait, that means the process has called
the kernel to read/write something. As it's a call to the kernel that's stuck,
the only way to force it to end is to kill the kernel. I.E. Reboot or shutdown.

Looking at the code for freenet, it runs under docker. Part of the code is ...
pub fn as_router() -> (Self, Router) {
let contract_web_path = std::env::temp_dir().join("locutus").join("webs");
std::fs::create_dir_all(contract_web_path).unwrap();

As it has open files in the temporary directory (usually /tmp), the mount point
containing the temporary directory can not be unmounted until docker exits.

It's docker itself that you would have to terminate or kill.

Regards, Dave Hodgins

Re: unmounting at shut down, confusing situation ...

<u91fd9$rcis$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=2064&group=alt.os.linux#2064

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: NoliMihiFrangereMentulam@libero.it (MarioCPPP)
Newsgroups: alt.os.linux
Subject: Re: unmounting at shut down, confusing situation ...
Date: Sun, 16 Jul 2023 21:11:36 +0200
Organization: A noiseless patient Spider
Lines: 67
Message-ID: <u91fd9$rcis$1@dont-email.me>
References: <u6pqcn$23fdi$1@dont-email.me> <u90km3$okpu$2@dont-email.me>
<pc3dojx4c2.ln2@Telcontar.valinor>
Reply-To: MarioCCCP@CCCP.MIR
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: base64
Injection-Date: Sun, 16 Jul 2023 19:11:42 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="6dcaa6ae3b1fbb79c9aa58fd033a7486";
logging-data="897628"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19JkJyuLWMnsBwMLnmQg4Ym"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:QLxtPwOJdL/spAH1ixENJDEQ88c=
In-Reply-To: <pc3dojx4c2.ln2@Telcontar.valinor>
Content-Language: en-GB, it-IT
 by: MarioCPPP - Sun, 16 Jul 2023 19:11 UTC

On 16/07/23 14:11, Carlos E.R. wrote:
> On 2023-07-16 13:35, MarioCPPP wrote:
>> On 19/06/23 16:57, MarioCPPP wrote:
>>
>> Incidentally (serendipity) I have discovered the culprit
>> of the long delay at shut down (and possibly also the
>> origin of errors in unmounting /tmp and /Data partitions.
>>
>> It is the FREENET service I used to load at startup
>> (seeding a node of such net).
>> Now I have disabled it (yet, it loads all the same, and I
>> still have to understand why).
>>
>> Anyway, the process cannot be shut down by
>> xfce4-taskmanager, not in plain user mode and not even,
>> surprisingly, in ROOT MODE !
>> Trying to stop / kill this FREENET daemon nothing happens.
>> Luckily, the installer also placed a shutdown app in the
>> menu, that works : using it the service vanishes from the
>> task manager.
>> I did not know some process could be survive ROOT
>> "orders". Maybe it operates at a lowest runlevel ?
>
> No, but if it is waiting on I/O, it can not be killed. Well,
> it can, but it doesn't disappear.
>
ah, intresting, but strange indeed. I mean, it's not a file
system operation, it is some network async operation that is
not blocking (in fact, when I loss connection, and it
happens annoyingly often, nothing happens. If I was
downloading a file, in a browser, the system shuts down
without an hexitation, and lets the download broken).
The strante is this daemon escalates so high privileges to
make its operations so prioritized
>
>> Dunno.
>> The fact is : once manually shut down, the system no
>> longer fails to unmount partitions nor delays the restart
>> or power off.
>>
>> Now I should understand how to get the closeup program
>> called on system shutdown, at very early stage.
>>
>> Cron/Anacron might have some utilities in this or they are
>> simply TIME-based and never EVENT-based ?
>
> Event based means using systemd.
ah, intresting ! One point for SystemD so
>
> On halt, the system you calls the clause for shutdown of the
> daemon. Killing it is a last resource.
>
> Example:
> /etc/systemd/system/network.service:
>
> ExecStart=/usr/sbin/wicked --systemd ifup all
> ExecStop=/usr/sbin/wicked --systemd ifdown all
> ExecReload=/usr/sbin/wicked --systemd ifreload all
>
do you think that such commands would work equally well for
a network protocol completely different and maybe
transparent (this FREENET does not use any popular protocol,
but like TOR and i2p its own. Maybe the system does not know
how to manage it ?
Just for talking, I don't know network management ...
>
> With initd scripts, there is of course an equivalent method.
> Example:
>
>
> /etc/init.d/nscd.rpmsave:
>
> case "$1" in
>     start)
>         echo -n "Starting Name Service Cache Daemon"
>         /sbin/startproc -p $NSCD_PID $NSCD_BIN
>         rc_status -v
>         ;;
>     stop)
>         echo -n "Shutting down Name Service Cache Daemon"
>         /sbin/killproc -p $NSCD_PID -TERM $NSCD_BIN
>         # if nscd does not run as root, it cannot remove
> this files:
>         rm -f /var/run/nscd/socket $NSCD_PID
>         rc_status -v
>         ;;
>     try-restart|condrestart)
>     ;;
> ...
>     restart)
>     ;;
> ...
>
> esac
>
>
>
>
>
>
--
1) Resistere, resistere, resistere.
2) Se tutti pagano le tasse, le tasse le pagano tutti
MarioCPPP

Re: unmounting at shut down, confusing situation ...

<n9vdojxfod.ln2@Telcontar.valinor>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=2065&group=alt.os.linux#2065

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: robin_listas@es.invalid (Carlos E.R.)
Newsgroups: alt.os.linux
Subject: Re: unmounting at shut down, confusing situation ...
Date: Sun, 16 Jul 2023 22:07:51 +0200
Lines: 64
Message-ID: <n9vdojxfod.ln2@Telcontar.valinor>
References: <u6pqcn$23fdi$1@dont-email.me> <u90km3$okpu$2@dont-email.me>
<pc3dojx4c2.ln2@Telcontar.valinor> <u91fd9$rcis$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net KCND/v675ag6eEXuqV44awYGUlbmYlaGqKMKEKoJY1cH9h7R1V
X-Orig-Path: Telcontar.valinor!not-for-mail
Cancel-Lock: sha1:vcBT8i7bpCQoA7eGYa5A03OiFq4= sha256:kT3OslZlk4+77HeWrhjEqcePQxCVKesD/iKBfGLvtbA=
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.9.1
Content-Language: es-ES, en-CA
In-Reply-To: <u91fd9$rcis$1@dont-email.me>
 by: Carlos E.R. - Sun, 16 Jul 2023 20:07 UTC

On 2023-07-16 21:11, MarioCPPP wrote:
> On 16/07/23 14:11, Carlos E.R. wrote:
>> On 2023-07-16 13:35, MarioCPPP wrote:
>>> On 19/06/23 16:57, MarioCPPP wrote:
>>>
>>> Incidentally (serendipity) I have discovered the culprit of the long
>>> delay at shut down (and possibly also the origin of errors in
>>> unmounting /tmp and /Data partitions.
>>>
>>> It is the FREENET service I used to load at startup (seeding a node
>>> of such net).
>>> Now I have disabled it (yet, it loads all the same, and I still have
>>> to understand why).

....

>>> Cron/Anacron might have some utilities in this or they are simply
>>> TIME-based and never EVENT-based ?
>>
>> Event based means using systemd.
>
> ah, intresting ! One point for SystemD so
>
>>
>> On halt, the system you calls the clause for shutdown of the daemon.
>> Killing it is a last resource.
>>
>> Example:
>> /etc/systemd/system/network.service:
>>
>> ExecStart=/usr/sbin/wicked --systemd ifup all
>> ExecStop=/usr/sbin/wicked --systemd ifdown all
>> ExecReload=/usr/sbin/wicked --systemd ifreload all
>>
>
> do you think that such commands would work equally well for a network
> protocol completely different and maybe transparent (this FREENET does
> not use any popular protocol, but like TOR and i2p its own. Maybe the
> system does not know how to manage it ?

Those config entries are normal systemd syntax. If you start and stop
your tool via a systemd service file (either global or for your user),
then you just need to have:

ExecStart=... whatever
ExecStop=...whatever

with the appropriate commands for starting and stopping your daemon.

You will also have to add entries to "start/stop before" whatever. Just
pick an existing service file that seems similar and use it as an example.

>
> Just for talking, I don't know network management ...

It is not about network management, it is about systemd. I just picked
the "wicked" service file as an example.

--
Cheers, Carlos.

Re: unmounting at shut down, confusing situation ...

<u91s9n$smvf$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=2066&group=alt.os.linux#2066

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: NoliMihiFrangereMentulam@libero.it (MarioCPPP)
Newsgroups: alt.os.linux
Subject: Re: unmounting at shut down, confusing situation ...
Date: Mon, 17 Jul 2023 00:51:35 +0200
Organization: A noiseless patient Spider
Lines: 66
Message-ID: <u91s9n$smvf$1@dont-email.me>
References: <u6pqcn$23fdi$1@dont-email.me> <u90km3$okpu$2@dont-email.me>
<op.176pszcta3w0dxdave@hodgins.homeip.net>
Reply-To: MarioCCCP@CCCP.MIR
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: base64
Injection-Date: Sun, 16 Jul 2023 22:51:36 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="55ae53540ca5e292db9c1591e510ec55";
logging-data="941039"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+ImAHRMuOm3orXP5/Rd2uL"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:d+DoQI4FuMiGk/R5JOaXF4fpRSg=
Content-Language: en-GB, it-IT
In-Reply-To: <op.176pszcta3w0dxdave@hodgins.homeip.net>
 by: MarioCPPP - Sun, 16 Jul 2023 22:51 UTC

On 16/07/23 19:06, David W. Hodgins wrote:
> On Sun, 16 Jul 2023 07:35:31 -0400, MarioCPPP
> <NoliMihiFrangereMentulam@libero.it> wrote:
>
>> On 19/06/23 16:57, MarioCPPP wrote:
>>
>> Incidentally (serendipity) I have discovered the culprit of
>> the long delay at shut down (and possibly also the origin of
>> errors in unmounting /tmp and /Data partitions.
>>
>> It is the FREENET service I used to load at startup (seeding
>> a node of such net).
>> Now I have disabled it (yet, it loads all the same, and I
>> still have to understand why).
>>
>> Anyway, the process cannot be shut down by
>> xfce4-taskmanager, not in plain user mode and not even,
>> surprisingly, in ROOT MODE !
>> Trying to stop / kill this FREENET daemon nothing happens.
>> Luckily, the installer also placed a shutdown app in the
>> menu, that works : using it the service vanishes from the
>> task manager.
>> I did not know some process could be survive ROOT "orders".
>> Maybe it operates at a lowest runlevel ?
>
> When you kill a process, normally it sends signal 15, aka
> SIGTERM to the
> process telling it to terminate. The process then closes
> files and exits,
> or can just ignore the signal.
>
> To force a process to exit, you can use signal 9, aka
> SIGKILL which tells
> the kernel to end the process. The process does not get a
> chance to flush
> it's buffers or do any other cleanup so files may end up
> corrupted.
I have not tried from cmdline, but from taskmanager I tried
to send all signals available there (
FERMA, TERMINA, INTERROMPI in italian translation, which I
tentatively translate as STOP, TERMINATE, PAUSE). Maybe none
of this is SigKill.
Also the CANC key sends "sth" (dunno what), maybe Terminate.
But the clean way is to invoke its own shutdown routine.
It seems to rely on JAVA. Now I don't know Docker ... is it
based on Java runtime ?
>
> If a process is stuck in a device wait, that means the
> process has called
> the kernel to read/write something. As it's a call to the
> kernel that's stuck,
> the only way to force it to end is to kill the kernel. I.E.
> Reboot or shutdown.
>
> Looking at the code for freenet, it runs under docker. Part
> of the code is ...
>     pub fn as_router() -> (Self, Router) {
>         let contract_web_path =
> std::env::temp_dir().join("locutus").join("webs");
>         std::fs::create_dir_all(contract_web_path).unwrap();
>
don't know this language, particularly the notation fn
name() -> .... that recalls me of arrow functions in JS, is
it Java ?
> As it has open files in the temporary directory (usually
> /tmp), the mount point
> containing the temporary directory can not be unmounted
> until docker exits.
yes, in fact /tmp gave error. Also the data drive gave
error, cause I was "seeding", that is reserving some
persistent storage (my /tmp is not persistent, it's part of
ram actually).
>
> It's docker itself that you would have to terminate or kill.
I did not notice this name. I noticed Linux-Wrapper-X (maybe
it's a Docker app, or it is a Java app : one of the delaying
processed was mentioned as sth-java, but always belonging to
FREENET, since shutting down it, everything disappeared and
shut down returned really fast).
TNX for all informations
>
> Regards, Dave Hodgins
--
1) Resistere, resistere, resistere.
2) Se tutti pagano le tasse, le tasse le pagano tutti
MarioCPPP

Re: unmounting at shut down, confusing situation ...

<u91sd9$smvf$2@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=2067&group=alt.os.linux#2067

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: NoliMihiFrangereMentulam@libero.it (MarioCPPP)
Newsgroups: alt.os.linux
Subject: Re: unmounting at shut down, confusing situation ...
Date: Mon, 17 Jul 2023 00:53:29 +0200
Organization: A noiseless patient Spider
Lines: 43
Message-ID: <u91sd9$smvf$2@dont-email.me>
References: <u6pqcn$23fdi$1@dont-email.me> <u90km3$okpu$2@dont-email.me>
<u90nbc$p0bi$1@dont-email.me>
Reply-To: MarioCCCP@CCCP.MIR
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 16 Jul 2023 22:53:29 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="55ae53540ca5e292db9c1591e510ec55";
logging-data="941039"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Addx6X7iI9Y4zcnBlsbWd"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:QQbHKPQ0wXKC5k5/5BAQXdNJrkY=
Content-Language: en-GB, it-IT
In-Reply-To: <u90nbc$p0bi$1@dont-email.me>
 by: MarioCPPP - Sun, 16 Jul 2023 22:53 UTC

On 16/07/23 14:20, Chris Elvidge wrote:
> On 16/07/2023 12:35, MarioCPPP wrote:
>> On 19/06/23 16:57, MarioCPPP wrote:
>>
>> Incidentally (serendipity) I have discovered the culprit
>> of the long delay at shut down (and possibly also the
>> origin of errors in unmounting /tmp and /Data partitions.
>>
>> It is the FREENET service I used to load at startup
>> (seeding a node of such net).
>> Now I have disabled it (yet, it loads all the same, and I
>> still have to understand why).
>>
>> Anyway, the process cannot be shut down by
>> xfce4-taskmanager, not in plain user mode and not even,
>> surprisingly, in ROOT MODE !
>> Trying to stop / kill this FREENET daemon nothing happens.
>> Luckily, the installer also placed a shutdown app in the
>> menu, that works : using it the service vanishes from the
>> task manager.
>> I did not know some process could be survive ROOT
>> "orders". Maybe it operates at a lowest runlevel ?
>
> A suggestion: Find out what the "shutdown app" actually runs

I don't even know what shutdown app really is, neither where
it is called nor when.

> and put that in /etc/rc.local_shutdown (or
> /etc/rc.d/rc.local_shutdown, depending on where rc.local
> actually is). Make sure rc.local_shutdown is executable.

I must be lacking a lot of prerequisites, as I did not
understand most of the above. Sorry :/ :/

>
>

--
1) Resistere, resistere, resistere.
2) Se tutti pagano le tasse, le tasse le pagano tutti
MarioCPPP

Re: unmounting at shut down, confusing situation ...

<7lfeojx3cb.ln2@Telcontar.valinor>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=2068&group=alt.os.linux#2068

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: robin_listas@es.invalid (Carlos E.R.)
Newsgroups: alt.os.linux
Subject: Re: unmounting at shut down, confusing situation ...
Date: Mon, 17 Jul 2023 02:47:03 +0200
Lines: 49
Message-ID: <7lfeojx3cb.ln2@Telcontar.valinor>
References: <u6pqcn$23fdi$1@dont-email.me> <u90km3$okpu$2@dont-email.me>
<u90nbc$p0bi$1@dont-email.me> <u91sd9$smvf$2@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net 8JbsTdZZBPJVb6xSXjMRCwRXGkhMR6wSe5XuhGL16Z30LLVHtu
X-Orig-Path: Telcontar.valinor!not-for-mail
Cancel-Lock: sha1:AAcOZKKE0g/0ocsgWg7LDb13430= sha256:SKcRtFY0xZGKhKvS09G+uiAexFsQPvJ53/uGfV7jbX4=
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.9.1
Content-Language: es-ES, en-CA
In-Reply-To: <u91sd9$smvf$2@dont-email.me>
 by: Carlos E.R. - Mon, 17 Jul 2023 00:47 UTC

On 2023-07-17 00:53, MarioCPPP wrote:
> On 16/07/23 14:20, Chris Elvidge wrote:
>> On 16/07/2023 12:35, MarioCPPP wrote:
>>> On 19/06/23 16:57, MarioCPPP wrote:
>>>
>>> Incidentally (serendipity) I have discovered the culprit of the long
>>> delay at shut down (and possibly also the origin of errors in
>>> unmounting /tmp and /Data partitions.
>>>
>>> It is the FREENET service I used to load at startup (seeding a node
>>> of such net).
>>> Now I have disabled it (yet, it loads all the same, and I still have
>>> to understand why).
>>>
>>> Anyway, the process cannot be shut down by
>>> xfce4-taskmanager, not in plain user mode and not even, surprisingly,
>>> in ROOT MODE !
>>> Trying to stop / kill this FREENET daemon nothing happens.
>>> Luckily, the installer also placed a shutdown app in the menu, that
>>> works : using it the service vanishes from the task manager.
>>> I did not know some process could be survive ROOT "orders". Maybe it
>>> operates at a lowest runlevel ?
>>
>> A suggestion: Find out what the "shutdown app" actually runs
>
> I don't even know what shutdown app really is, neither where it is
> called nor when.

Yes, you do. You said:

«Luckily, the installer also placed a shutdown app in the menu, that
works : using it the service vanishes from the task manager.»

That's the one.

>
>> and put that in /etc/rc.local_shutdown (or
>> /etc/rc.d/rc.local_shutdown, depending on where rc.local actually is).
>> Make sure rc.local_shutdown is executable.
>
> I must be lacking a lot of prerequisites, as I did not understand most
> of the above. Sorry :/ :/

A menu entry or an icon runs something. Just find out what. They are
text files. Right click on the entry, choose properties.

--
Cheers, Carlos.

Re: unmounting at shut down, confusing situation ...

<op.177gbbu7a3w0dxdave@hodgins.homeip.net>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=2069&group=alt.os.linux#2069

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: dwhodgins@nomail.afraid.org (David W. Hodgins)
Newsgroups: alt.os.linux
Subject: Re: unmounting at shut down, confusing situation ...
Date: Sun, 16 Jul 2023 22:39:01 -0400
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <op.177gbbu7a3w0dxdave@hodgins.homeip.net>
References: <u6pqcn$23fdi$1@dont-email.me> <u90km3$okpu$2@dont-email.me>
<op.176pszcta3w0dxdave@hodgins.homeip.net> <u91s9n$smvf$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="eb72b6f9587cc4afc68e114d04792204";
logging-data="1104351"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/uUMOGM0Cd36uKdWJ85/xyMdbs9Wna5lo="
User-Agent: Opera Mail/12.16 (Linux)
Cancel-Lock: sha1:e+gXG4GUjKLKcx6Yu+UpV+PQjlU=
 by: David W. Hodgins - Mon, 17 Jul 2023 02:39 UTC

On Sun, 16 Jul 2023 18:51:35 -0400, MarioCPPP <NoliMihiFrangereMentulam@libero.it> wrote:
> It seems to rely on JAVA. Now I don't know Docker ... is it
> based on Java runtime ?

No. See https://en.wikipedia.org/wiki/Docker_(software)

For freenet, I assume it's https://freenet.org/about which uses a docker
container with the application written the language called rust.

https://www.rust-lang.org/

> yes, in fact /tmp gave error. Also the data drive gave
> error, cause I was "seeding", that is reserving some
> persistent storage (my /tmp is not persistent, it's part of
> ram actually).

/tmp can be an on disk file system or tmpfs file system in ram. Either way,
it's still a file system that gets mounted.

Regards, Dave Hodgins

Re: unmounting at shut down, confusing situation ...

<u936t7$14hlj$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=2070&group=alt.os.linux#2070

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: NoliMihiFrangereMentulam@libero.it (MarioCPPP)
Newsgroups: alt.os.linux
Subject: Re: unmounting at shut down, confusing situation ...
Date: Mon, 17 Jul 2023 12:58:47 +0200
Organization: A noiseless patient Spider
Lines: 49
Message-ID: <u936t7$14hlj$1@dont-email.me>
References: <u6pqcn$23fdi$1@dont-email.me> <u90km3$okpu$2@dont-email.me>
<u90nbc$p0bi$1@dont-email.me> <u91sd9$smvf$2@dont-email.me>
<7lfeojx3cb.ln2@Telcontar.valinor>
Reply-To: MarioCCCP@CCCP.MIR
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: base64
Injection-Date: Mon, 17 Jul 2023 10:58:49 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="df622d582ba6febfa65bdd306d5807bc";
logging-data="1197747"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1//052oWqdloi9LlXuUayxp"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:1slgL3XuGmjcEUbWAbUrLzlvJ0A=
Content-Language: en-GB, it-IT
In-Reply-To: <7lfeojx3cb.ln2@Telcontar.valinor>
 by: MarioCPPP - Mon, 17 Jul 2023 10:58 UTC

On 17/07/23 02:47, Carlos E.R. wrote:
> On 2023-07-17 00:53, MarioCPPP wrote:
>> On 16/07/23 14:20, Chris Elvidge wrote:
>>> On 16/07/2023 12:35, MarioCPPP wrote:
>>>> On 19/06/23 16:57, MarioCPPP wrote:
>>>>
>>>> Incidentally (serendipity) I have discovered the culprit
>>>> of the long delay at shut down (and possibly also the
>>>> origin of errors in unmounting /tmp and /Data partitions.
>>>>
>>>> It is the FREENET service I used to load at startup
>>>> (seeding a node of such net).
>>>> Now I have disabled it (yet, it loads all the same, and
>>>> I still have to understand why).
>>>>
>>>> Anyway, the process cannot be shut down by
>>>> xfce4-taskmanager, not in plain user mode and not even,
>>>> surprisingly, in ROOT MODE !
>>>> Trying to stop / kill this FREENET daemon nothing happens.
>>>> Luckily, the installer also placed a shutdown app in the
>>>> menu, that works : using it the service vanishes from
>>>> the task manager.
>>>> I did not know some process could be survive ROOT
>>>> "orders". Maybe it operates at a lowest runlevel ?
>>>
>>> A suggestion: Find out what the "shutdown app" actually runs
>>
>> I don't even know what shutdown app really is, neither
>> where it is called nor when.
>
> Yes, you do. You said:
>
> «Luckily, the installer also placed a shutdown app in the
> menu, that works : using it the service vanishes from the
> task manager.»
>
> That's the one.
but that's a launcher to be used MANUALLY

the launcher points to :
/home/UtenteXXX/My/My/Scaricati/FreeNet/run.sh stop
where do I have to add this command to have it executed
early during shutdown process ?
How to pass it to SystemD ?
>
>>
>>> and put that in /etc/rc.local_shutdown (or
>>> /etc/rc.d/rc.local_shutdown, depending on where rc.local
>>> actually is). Make sure rc.local_shutdown is executable.
I have no such folder, just
rc0.d ... rc6.d and one rcS.d folders, under /etc/
Searching local.shutdown
scanning all /etc/ with RegEx I cant find anything
resembling rc.local_shutdown alas :(

>>
>> I must be lacking a lot of prerequisites, as I did not
>> understand most of the above. Sorry :/ :/
>
> A menu entry or an icon runs something. Just find out what.
> They are text files. Right click on the entry, choose
> properties.
yes, but menu entries aren't "event-driven", but manual. I
dunno how to turn a manually run stuff into an executed upon
event one
>
--
1) Resistere, resistere, resistere.
2) Se tutti pagano le tasse, le tasse le pagano tutti
MarioCPPP

Re: unmounting at shut down, confusing situation ...

<u938v2$14oi0$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=2071&group=alt.os.linux#2071

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: NoliMihiFrangereMentulam@libero.it (MarioCPPP)
Newsgroups: alt.os.linux
Subject: Re: unmounting at shut down, confusing situation ...
Date: Mon, 17 Jul 2023 13:33:54 +0200
Organization: A noiseless patient Spider
Lines: 172
Message-ID: <u938v2$14oi0$1@dont-email.me>
References: <u6pqcn$23fdi$1@dont-email.me> <u90km3$okpu$2@dont-email.me>
<op.176pszcta3w0dxdave@hodgins.homeip.net> <u91s9n$smvf$1@dont-email.me>
<op.177gbbu7a3w0dxdave@hodgins.homeip.net>
Reply-To: MarioCCCP@CCCP.MIR
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: base64
Injection-Date: Mon, 17 Jul 2023 11:33:55 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="df622d582ba6febfa65bdd306d5807bc";
logging-data="1204800"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/ccGcea1rMwjwXc4GQ1mDV"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:IyO7JeiFF0dKjxmeVzaw3LP564w=
Content-Language: en-GB, it-IT
In-Reply-To: <op.177gbbu7a3w0dxdave@hodgins.homeip.net>
 by: MarioCPPP - Mon, 17 Jul 2023 11:33 UTC

On 17/07/23 04:39, David W. Hodgins wrote:
> On Sun, 16 Jul 2023 18:51:35 -0400, MarioCPPP
> <NoliMihiFrangereMentulam@libero.it> wrote:
>> It seems to rely on JAVA. Now I don't know Docker ... is it
>> based on Java runtime ?
>
> No. See https://en.wikipedia.org/wiki/Docker_(software)
>
> For freenet, I assume it's https://freenet.org/about which
> uses a docker
> container with the application written the language called
> rust.
>
> https://www.rust-lang.org/
I scanned the disk to discover the seeding cache and the
executables
I paste the result of TREE cmd at the folder found
.
├── bcprov-jdk15on-1.59.jar
├── bin
│   ├── bindtest.jar
│   ├── browser.jar
│   ├── browse.sh
│   ├── remove_cronjob.sh
│   ├── sha1test.jar
│   ├── uncompress.jar
│   ├── wrapper-linux-armel-32
│   ├── wrapper-linux-armhf-32
│   ├── wrapper-linux-ia64-64
│   ├── wrapper-linux-ppc-32
│   ├── wrapper-linux-ppc-64
│   ├── wrapper-linux-x86-32
│   ├── wrapper-linux-x86-64
│   └── wrapper.log
├── bookmarks.dat
├── bootID
├── Browse-Freenet-1655918507533.desktop
├── client.dat.bak.crypt
├── client.dat.crypt
├── client-throttle.dat
├── completed.list.downloads
├── completed.list.uploads
├── datastore
│   ├── CHK-cache.config
│   ├── CHK-cache.hd
│   ├── CHK-cache.metadata
│   ├── CHK-cache.slotfilter
│   ├── CHK-clientcache.config
│   ├── CHK-clientcache.hd
│   ├── CHK-clientcache.metadata
│   ├── CHK-clientcache.slotfilter
│   ├── CHK-store.config
│   ├── CHK-store.hd
│   ├── CHK-store.metadata
│   ├── CHK-store.slotfilter
│   ├── PUBKEY-cache.config
│   ├── PUBKEY-cache.hd
│   ├── PUBKEY-cache.metadata
│   ├── PUBKEY-cache.slotfilter
│   ├── PUBKEY-clientcache.config
│   ├── PUBKEY-clientcache.hd
│   ├── PUBKEY-clientcache.metadata
│   ├── PUBKEY-clientcache.slotfilter
│   ├── PUBKEY-store.config
│   ├── PUBKEY-store.hd
│   ├── PUBKEY-store.metadata
│   ├── PUBKEY-store.slotfilter
│   ├── SSK-cache.config
│   ├── SSK-cache.hd
│   ├── SSK-cache.metadata
│   ├── SSK-cache.slotfilter
│   ├── SSK-clientcache.config
│   ├── SSK-clientcache.hd
│   ├── SSK-clientcache.metadata
│   ├── SSK-clientcache.slotfilter
│   ├── SSK-store.config
│   ├── SSK-store.hd
│   ├── SSK-store.metadata
│   └── SSK-store.slotfilter
├── downloads
│   └──
flip-linux-amd64-bin-0.3.1.tar.gz5055593561891797652.freenet-tmp
├── extra-peer-data-14677
├── freenet-ext.jar
├── freenet.ico
├── freenet.ini
├── freenet.jar
├── freenet.jar.new
├── freenet-latest-installer-nonwindows.jar
├── freenet-latest-installer-windows.exe
├── freenet-stable-latest.jar
├── IpToCountry.dat
├── IzPackLocaleEnabledXdgDesktopIconScript.sh
├── jna-4.5.2.jar
├── jna-4.5.2.jar4209881716369391134.updater.tmp
├── jna-platform-4.5.2.jar
├── jna-platform-4.5.2.jar9778121626343741346.updater.tmp
├── lib
│   ├── libwrapper-linux-armel-32.so
│   ├── libwrapper-linux-armhf-32.so
│   ├── libwrapper-linux-ia64-64.so
│   ├── libwrapper-linux-ppc-32.so
│   ├── libwrapper-linux-ppc-64.so
│   ├── libwrapper-linux-x86-32.so
│   └── libwrapper-linux-x86-64.so
├── LICENSE.Freenet
├── LICENSE.Mantissa
├── logs
│   ├── freenet-1497-2023-07-14-20.log.gz
│   ├── freenet-1497-2023-07-14-21.log.gz
│   ├── freenet-1497-2023-07-14-22.log.gz
│   ├── freenet-1497-2023-07-14-23.log.gz
│   ├── freenet-1497-2023-07-15-00.log.gz
│   ├── freenet-1497-2023-07-15-01.log.gz
│   ├── freenet-1497-2023-07-15-02.log.gz
│   ├── freenet-1497-2023-07-15-03.log.gz
│   ├── freenet-1497-2023-07-15-04.log.gz
│   ├── freenet-1497-2023-07-15-05.log.gz
│   ├── freenet-1497-2023-07-15-06.log.gz
│   ├── freenet-1497-2023-07-15-07.log.gz
│   ├── freenet-1497-2023-07-15-08.log.gz
│   ├── freenet-1497-2023-07-15-09.log.gz
│   ├── freenet-1497-2023-07-15-10.log.gz
│   ├── freenet-1497-2023-07-15-11.log.gz
│   ├── freenet-1497-2023-07-15-12.log.gz
│   ├── freenet-1497-2023-07-15-13.log.gz
│   ├── freenet-1497-2023-07-15-14.log.gz
│   ├── freenet-1497-2023-07-15-15.log.gz
│   ├── freenet-1497-2023-07-15-16.log.gz
│   ├── freenet-1497-2023-07-15-17.log.gz
│   ├── freenet-1497-2023-07-15-22.log.gz
│   ├── freenet-latest.log
│   └── freenet-previous.log
├── master.keys
├── memory.autolimit
├── node-14677
├── node-throttle.dat
├── offline
├── opennet-59431
├── openpeers-59431
├── openpeers-59431.bak
├── openpeers-old-59431
├── openpeers-old-59431.bak
├── packets-14677.dat
├── packets-59431.dat
├── pebble-3.1.5.jar
├── pebble-3.1.5.jar18278901836451014976.updater.tmp
├── peers-14677
├── persistent-temp
│   ├── legacy-freenet-jar-1481.fblob
│   ├──
legacy-freenet-jar-1481.fblob102242510824075000.updater.fblob.tmp15127590578761804748.freenet-tmp
│   ├──
main-jar-1493-7408725299069490750.fblob.tmp11873849515888056812.freenet-tmp
│   ├── main-jar-1493.fblob
│   ├── main-jar-1494.fblob
│   ├── main-jar-1495.fblob
│   ├── main-jar-1496.fblob
│   └── main-jar-1497.fblob
├── plugin-data
│   ├── plugins.Library.Main.data.bak.crypt
│   └── plugins.Library.Main.data.crypt
├── plugins
│   ├── JSTUN.jar
│   ├── KeyUtils.jar
│   ├── Library.jar
│   ├── Sharesite.jar
│   ├── ThawIndexBrowser.jar
│   └── UPnP.jar
├── prng.seed
├── README
├── run.sh
├── seednodes.fref
├── sha1test.jar
├── slf4j-api-1.7.25.jar
├── slf4j-api-1.7.25.jar9692460383893678503.updater.tmp
├── startssl.pem
├── temp
│   └── temp-b49601a002472cd5
├── The-Freenet-Project-Website-1655918507538.desktop
├── tmp
│   └── jna--403337722
├── unbescape-1.1.6.RELEASE.jar
├── unbescape-1.1.6.RELEASE.jar3558948160463069835.updater.tmp
├── Uninstaller
│   ├── install.log
│   ├── show_uninstall_survey.sh
│   └── uninstaller.jar
├── update.sh
├── uptime.dat
├── uptime.old.dat
├── wrapper.conf
├── wrapper.conf.old
├── wrapper_Darwin.zip
├── wrapper_Darwin.zip.sha1
├── wrapper.jar
├── wrapper_Linux.zip
├── wrapper_Linux.zip.sha1
├── wrapper.log
├── wrapper.log.1
├── wrapper.log.2
└── wrapper.log.3

14 directories, 168 files
maybe it's rust, but perhaps for this particular install, it
actually seems sth JAVA (it's full of JAR packages).
Also appears that "wrapper-linux" that was reported blocking
the shut down
>
>> yes, in fact /tmp gave error. Also the data drive gave
>> error, cause I was "seeding", that is reserving some
>> persistent storage (my /tmp is not persistent, it's part of
>> ram actually).
>
> /tmp can be an on disk file system or tmpfs file system in
> ram. Either way,
> it's still a file system that gets mounted.
yes. Anyway there are also 10 GB of permanent storage on the
other partition that gave problem to be unmounted (it was
almost exactly the amount I had set up for seeding).
Anyway this story is curious because it was not only the
annoying delay of shut down that kept me inquiring, but the
fact that the (MECHANICAL) disk was forever active and
muttering and since it is a disk full of invaluable data,
that continuous activity started to make me nervous.
I have 64 GB of physical RAM and 64 GB of swap partition,
I'd have expected some better caching than that.
So actually I started to chase the culprit, stopping
processes to see which used the disk so much.
In the TASK MANAGER (at least xfce4 version) there are a lot
of columns, but none dedicated to DISK I/O, and the CPU
usage was not so high, so I strieved to locate this freenet
as the responsible of disk heavy use. Also some 3 K log
files were there (I deleted all but the past day manually,
to keep this extract human-readable).

Click here to read the complete article

Re: unmounting at shut down, confusing situation ...

<khknstF32vjU1@mid.individual.net>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=2072&group=alt.os.linux#2072

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!news.neodome.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: user@example.net (J.O. Aho)
Newsgroups: alt.os.linux
Subject: Re: unmounting at shut down, confusing situation ...
Date: Mon, 17 Jul 2023 13:44:29 +0200
Lines: 27
Message-ID: <khknstF32vjU1@mid.individual.net>
References: <u6pqcn$23fdi$1@dont-email.me> <u90km3$okpu$2@dont-email.me>
<u90nbc$p0bi$1@dont-email.me> <u91sd9$smvf$2@dont-email.me>
<7lfeojx3cb.ln2@Telcontar.valinor> <u936t7$14hlj$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net 4LEYebr+lGi1romxfhcnRAHqqxebgPloMxzT1rqekFKqWUpJ7Q
Cancel-Lock: sha1:TY9udW/jmKpBG0+xk605mwcHkUI= sha256:dwRi+7JAXkEjSGjwDl3SFILLqArJF0x6Q/BhOxzNbv8=
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Content-Language: en-US-large
In-Reply-To: <u936t7$14hlj$1@dont-email.me>
 by: J.O. Aho - Mon, 17 Jul 2023 11:44 UTC

On 7/17/23 12:58, MarioCPPP wrote:

> the launcher points to :
> /home/UtenteXXX/My/My/Scaricati/FreeNet/run.sh stop
>
> where do I have to add this command to have it executed early during
> shutdown process ?

I would suggest a custom systemd unit to handle starting and stopping
the service
a starting point would be reading:
http://tuxgraphics.org/npa/systemd-scripts/

I would suggest you let systemd to handle the starting and stopping the
service, just see to that it depends on network, then it's started after
the network is up and stopped before the network is down, this would
allow you to use network based file systems too (if it would be needed
for some strange reason in the future).

> How to pass it to SystemD ?

No one knows, as there ain't a such thing.
https://freedesktop.org/wiki/Software/systemd/

--
//Aho

Re: unmounting at shut down, confusing situation ...

<42rfojxlk9.ln2@Telcontar.valinor>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=2073&group=alt.os.linux#2073

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: robin_listas@es.invalid (Carlos E.R.)
Newsgroups: alt.os.linux
Subject: Re: unmounting at shut down, confusing situation ...
Date: Mon, 17 Jul 2023 15:07:48 +0200
Lines: 66
Message-ID: <42rfojxlk9.ln2@Telcontar.valinor>
References: <u6pqcn$23fdi$1@dont-email.me> <u90km3$okpu$2@dont-email.me>
<u90nbc$p0bi$1@dont-email.me> <u91sd9$smvf$2@dont-email.me>
<7lfeojx3cb.ln2@Telcontar.valinor> <u936t7$14hlj$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net AOCECmg+mdbOaf95Wk5ABglEMUI/IPGG9gcbx0TEtdOWTYmKhl
X-Orig-Path: Telcontar.valinor!not-for-mail
Cancel-Lock: sha1:gi66qJxnNOptYypWB08cCUzGLn0= sha256:h6van92CVUmu3O1foN6hs7QjJ7ifpyODu+SYLFejORQ=
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.9.1
Content-Language: es-ES, en-CA
In-Reply-To: <u936t7$14hlj$1@dont-email.me>
 by: Carlos E.R. - Mon, 17 Jul 2023 13:07 UTC

On 2023-07-17 12:58, MarioCPPP wrote:
> On 17/07/23 02:47, Carlos E.R. wrote:
>> On 2023-07-17 00:53, MarioCPPP wrote:
>>> On 16/07/23 14:20, Chris Elvidge wrote:
>>>> On 16/07/2023 12:35, MarioCPPP wrote:
>>>>> On 19/06/23 16:57, MarioCPPP wrote:
>>>>>
>>>>> Incidentally (serendipity) I have discovered the culprit of the
>>>>> long delay at shut down (and possibly also the origin of errors in
>>>>> unmounting /tmp and /Data partitions.
>>>>>
>>>>> It is the FREENET service I used to load at startup (seeding a node
>>>>> of such net).
>>>>> Now I have disabled it (yet, it loads all the same, and I still
>>>>> have to understand why).
>>>>>
>>>>> Anyway, the process cannot be shut down by
>>>>> xfce4-taskmanager, not in plain user mode and not even,
>>>>> surprisingly, in ROOT MODE !
>>>>> Trying to stop / kill this FREENET daemon nothing happens.
>>>>> Luckily, the installer also placed a shutdown app in the menu, that
>>>>> works : using it the service vanishes from the task manager.
>>>>> I did not know some process could be survive ROOT "orders". Maybe
>>>>> it operates at a lowest runlevel ?
>>>>
>>>> A suggestion: Find out what the "shutdown app" actually runs
>>>
>>> I don't even know what shutdown app really is, neither where it is
>>> called nor when.
>>
>> Yes, you do. You said:
>>
>> «Luckily, the installer also placed a shutdown app in the menu, that
>> works : using it the service vanishes from the task manager.»
>>
>> That's the one.
>
> but that's a launcher to be used MANUALLY

Fine :-)

>
>
> the launcher points to :
> /home/UtenteXXX/My/My/Scaricati/FreeNet/run.sh stop
>
> where do I have to add this command to have it executed early during
> shutdown process ?
>
> How to pass it to SystemD ?

You have to write up a service file, probably named "FreeNet.service"
that among many other things, contains:

ExecStop=/home/UtenteXXX/My/My/Scaricati/FreeNet/run.sh stop

It is possible that such a file already exists in the FreeNet package
somewhere.

--
Cheers, Carlos.

Re: unmounting at shut down, confusing situation ...

<op.178p0kt5a3w0dxdave@hodgins.homeip.net>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=2074&group=alt.os.linux#2074

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: dwhodgins@nomail.afraid.org (David W. Hodgins)
Newsgroups: alt.os.linux
Subject: Re: unmounting at shut down, confusing situation ...
Date: Mon, 17 Jul 2023 15:06:10 -0400
Organization: A noiseless patient Spider
Lines: 10
Message-ID: <op.178p0kt5a3w0dxdave@hodgins.homeip.net>
References: <u6pqcn$23fdi$1@dont-email.me> <u90km3$okpu$2@dont-email.me>
<op.176pszcta3w0dxdave@hodgins.homeip.net> <u91s9n$smvf$1@dont-email.me>
<op.177gbbu7a3w0dxdave@hodgins.homeip.net> <u938v2$14oi0$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="eb72b6f9587cc4afc68e114d04792204";
logging-data="1406018"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+uuOHJQsgX4aCCYL6OObBJgcKVi193nDQ="
User-Agent: Opera Mail/12.16 (Linux)
Cancel-Lock: sha1:Q90HcPPsx2yqLh4L3B/SqBKoSo0=
 by: David W. Hodgins - Mon, 17 Jul 2023 19:06 UTC

On Mon, 17 Jul 2023 07:33:54 -0400, MarioCPPP <NoliMihiFrangereMentulam@libero.it> wrote:
> I paste the result of TREE cmd at the folder found

Snip. That is a java implementation of freenet, which appears to be from
https://sourceforge.net/projects/freenet/

I was looking at https://freenet.org/ which is a rust implementation of
the same thing that runs under docker.

Regards, Dave Hodgins

Re: unmounting at shut down, confusing situation ...

<op.179ji1uia3w0dxdave@hodgins.homeip.net>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=2081&group=alt.os.linux#2081

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: dwhodgins@nomail.afraid.org (David W. Hodgins)
Newsgroups: alt.os.linux
Subject: Re: unmounting at shut down, confusing situation ...
Date: Tue, 18 Jul 2023 01:43:39 -0400
Organization: A noiseless patient Spider
Lines: 53
Message-ID: <op.179ji1uia3w0dxdave@hodgins.homeip.net>
References: <u6pqcn$23fdi$1@dont-email.me> <u90km3$okpu$2@dont-email.me>
<u90nbc$p0bi$1@dont-email.me> <u91sd9$smvf$2@dont-email.me>
<7lfeojx3cb.ln2@Telcontar.valinor> <u936t7$14hlj$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="76ea7c713203f0d1f758fa56468f217c";
logging-data="1646764"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX184+2HiRBn9X9RURPv3GP2D/5Yrn8FBI4A="
User-Agent: Opera Mail/12.16 (Linux)
Cancel-Lock: sha1:fHY4QO9osWfRPoYwLxGrc413O0w=
 by: David W. Hodgins - Tue, 18 Jul 2023 05:43 UTC

On Mon, 17 Jul 2023 06:58:47 -0400, MarioCPPP <NoliMihiFrangereMentulam@libero.it> wrote:
> but that's a launcher to be used MANUALLY
> the launcher points to :
> /home/UtenteXXX/My/My/Scaricati/FreeNet/run.sh stop
> where do I have to add this command to have it executed
> early during shutdown process ?
> How to pass it to SystemD ?

Finally got around to figuring out how to do this. :-)

As root, create a service that will run at shutdown or reboot, just before
the network stops.

# cat /etc/systemd/system/reboot-or-shutdown.service
[Unit]
Description=My service to do things at reboot or shutdown time
After=network.target
Before=systemd-reboot.service shutdown.target

[Service]
Type=oneshot
ExecStart=/usr/bin/true
ExecStop=/root/somescript
RemainAfterExit=yes

[Install]
WantedBy=sysinit.target

Create the script. I used /root/somescript as the file name. After creating
the script file don't forget to "chmod a+x /root/somescript". To test this I
used ...
# cat /root/somescript
#!/bin/bash
/usr/bin/printf "$0 executed yyyyyyyyyyyyyyyyyyy"

Note that the script runs as root and the output goes to the journal.
I added the part of the string with the letter y repeated to make it easy
to find when checking the journal output to confirm it ran just before
stopping the network.

Instead of the above, in your script put
#!/bin/bash
su -l UtenteXXX -c '/home/UtenteXXX/My/My/Scaricati/FreeNet/run.sh stop'

Also, instead of using /root/somescript, it would be better to use something
like /usr/local/sbin/stopFreeNet as the file name for the script and in the
ExecStop line of the service.

Once you've created it run
# systemctl daemon-reload
# systemctl enable reboot-or-shutdown.service

Regards, Dave Hodgins

Re: unmounting at shut down, confusing situation ...

<u960g8$1l0ik$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=2084&group=alt.os.linux#2084

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: NoliMihiFrangereMentulam@libero.it (MarioCPPP)
Newsgroups: alt.os.linux
Subject: Re: unmounting at shut down, confusing situation ...
Date: Tue, 18 Jul 2023 14:27:52 +0200
Organization: A noiseless patient Spider
Lines: 76
Message-ID: <u960g8$1l0ik$1@dont-email.me>
References: <u6pqcn$23fdi$1@dont-email.me> <u90km3$okpu$2@dont-email.me>
<u90nbc$p0bi$1@dont-email.me> <u91sd9$smvf$2@dont-email.me>
<7lfeojx3cb.ln2@Telcontar.valinor> <u936t7$14hlj$1@dont-email.me>
<op.179ji1uia3w0dxdave@hodgins.homeip.net>
Reply-To: MarioCCCP@CCCP.MIR
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 18 Jul 2023 12:27:52 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="08a6c84d1b8007201c7d631fdbc103c5";
logging-data="1737300"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/NaSdmdAc9UJA2d2VkrEvH"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:OjjrRx1ujYbtrwfM/EsMMVkvOIo=
In-Reply-To: <op.179ji1uia3w0dxdave@hodgins.homeip.net>
Content-Language: en-GB, it-IT
 by: MarioCPPP - Tue, 18 Jul 2023 12:27 UTC

On 18/07/23 07:43, David W. Hodgins wrote:
> On Mon, 17 Jul 2023 06:58:47 -0400, MarioCPPP
> <NoliMihiFrangereMentulam@libero.it> wrote:
>> but that's a launcher to be used MANUALLY
>> the launcher points to :
>> /home/UtenteXXX/My/My/Scaricati/FreeNet/run.sh stop
>> where do I have to add this command to have it executed
>> early during shutdown process ?
>> How to pass it to SystemD ?
>
> Finally got around to figuring out how to do this. :-)
>
> As root, create a service that will run at shutdown or
> reboot, just before
> the network stops.
>
> # cat /etc/systemd/system/reboot-or-shutdown.service

file or directory does not exist :(
OK, i'll look for sth similar under the path

> [Unit]
> Description=My service to do things at reboot or shutdown time
> After=network.target
> Before=systemd-reboot.service shutdown.target
>
> [Service]
> Type=oneshot
> ExecStart=/usr/bin/true
> ExecStop=/root/somescript
> RemainAfterExit=yes
>
> [Install]
> WantedBy=sysinit.target
>
> Create the script. I used /root/somescript as the file name.
> After creating
> the script file don't forget to "chmod a+x
> /root/somescript". To test this I
> used ...
> # cat /root/somescript
> #!/bin/bash
> /usr/bin/printf "$0 executed yyyyyyyyyyyyyyyyyyy"
>
> Note that the script runs as root and the output goes to the
> journal.
> I added the part of the string with the letter y repeated to
> make it easy
> to find when checking the journal output to confirm it ran
> just before
> stopping the network.
>
> Instead of the above, in your script put
> #!/bin/bash
> su -l UtenteXXX -c
> '/home/UtenteXXX/My/My/Scaricati/FreeNet/run.sh stop'
>
> Also, instead of using /root/somescript, it would be better
> to use something
> like /usr/local/sbin/stopFreeNet as the file name for the
> script and in the
> ExecStop line of the service.
>
> Once you've created it run
> # systemctl daemon-reload
> # systemctl enable reboot-or-shutdown.service
>
> Regards, Dave Hodgins

--
1) Resistere, resistere, resistere.
2) Se tutti pagano le tasse, le tasse le pagano tutti
MarioCPPP

Re: unmounting at shut down, confusing situation ...

<rndiojx8l7.ln2@Telcontar.valinor>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=2085&group=alt.os.linux#2085

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: robin_listas@es.invalid (Carlos E.R.)
Newsgroups: alt.os.linux
Subject: Re: unmounting at shut down, confusing situation ...
Date: Tue, 18 Jul 2023 14:38:51 +0200
Lines: 26
Message-ID: <rndiojx8l7.ln2@Telcontar.valinor>
References: <u6pqcn$23fdi$1@dont-email.me> <u90km3$okpu$2@dont-email.me>
<u90nbc$p0bi$1@dont-email.me> <u91sd9$smvf$2@dont-email.me>
<7lfeojx3cb.ln2@Telcontar.valinor> <u936t7$14hlj$1@dont-email.me>
<op.179ji1uia3w0dxdave@hodgins.homeip.net> <u960g8$1l0ik$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net z+Cc6Me8ITaINeZNyM10gAUNKbzxxLdS4wqNJKQIK31lRwPhH2
X-Orig-Path: Telcontar.valinor!not-for-mail
Cancel-Lock: sha1:8RywuMDcqI8A+HbeKOG4kuWSDzY= sha256:gTIjt2jk+6deg5trRsrPGPNBTa/cA5JquXN27LS9UHY=
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.9.1
Content-Language: es-ES, en-CA
In-Reply-To: <u960g8$1l0ik$1@dont-email.me>
 by: Carlos E.R. - Tue, 18 Jul 2023 12:38 UTC

On 2023-07-18 14:27, MarioCPPP wrote:
> On 18/07/23 07:43, David W. Hodgins wrote:
>> On Mon, 17 Jul 2023 06:58:47 -0400, MarioCPPP

>> Finally got around to figuring out how to do this. :-)
>>
>> As root, create a service that will run at shutdown or reboot, just
.............*******

>> before
>> the network stops.
>>
>> # cat /etc/systemd/system/reboot-or-shutdown.service
>
>
> file or directory does not exist :(
> OK, i'll look for sth similar under the path

Which is the same I told you. *You* create the service file with several
lines, and one is:

ExecStop=/home/UtenteXXX/My/My/Scaricati/FreeNet/run.sh stop

--
Cheers, Carlos.

Re: unmounting at shut down, confusing situation ...

<slrnubddl3.1bfo.BitTwister@wb.home.arpa>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=2089&group=alt.os.linux#2089

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: BitTwister@mouse-potato.com (Bit Twister)
Newsgroups: alt.os.linux
Subject: Re: unmounting at shut down, confusing situation ...
Date: Tue, 18 Jul 2023 10:58:24 -0500
Organization: A noiseless patient Spider
Lines: 36
Message-ID: <slrnubddl3.1bfo.BitTwister@wb.home.arpa>
References: <u6pqcn$23fdi$1@dont-email.me> <u90km3$okpu$2@dont-email.me>
<u90nbc$p0bi$1@dont-email.me> <u91sd9$smvf$2@dont-email.me>
<7lfeojx3cb.ln2@Telcontar.valinor> <u936t7$14hlj$1@dont-email.me>
<op.179ji1uia3w0dxdave@hodgins.homeip.net> <u960g8$1l0ik$1@dont-email.me>
Injection-Info: dont-email.me; posting-host="8e714730252b467d031e01176ba38cce";
logging-data="1799342"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+SVKQwLGVeRx23YPkM4xwtojEElO0byr8="
User-Agent: slrn/pre1.0.4-6 (Linux)
Cancel-Lock: sha1:WYsOLu2UnEn2f3Cv+SPa+6ofVkU=
 by: Bit Twister - Tue, 18 Jul 2023 15:58 UTC

On Tue, 18 Jul 2023 14:27:52 +0200, MarioCPPP wrote:
> On 18/07/23 07:43, David W. Hodgins wrote:
> As root, create a service that will run at shutdown or
>> reboot, just before
>> the network stops.
>>
>> # cat /etc/systemd/system/reboot-or-shutdown.service
>
>
> file or directory does not exist :(
> OK, i'll look for sth similar under the path

I would recommend using the "locate" command or "find" command.

Might not hurt to use the "man" command once in a while. For example:
man -k systemd

For systemd unit files I suggest something like
man systemd.unit
where the SEE ALSO" section might suggest "systemd.service"

It would not hurt for you to always provide distribution, release, and
Desktop Environment and kernel being used. I suggest in a .signature file
so you automagically show it in all posts.

For example:
Running Mageia release 7 (Official) for x86_64 using
Kernel 5.5.15-desktop-3.mga7 on x86_64 DM=lightdm DE=xfce

That kind of information can help any subject matter expert to provide
you with more exacting/informative response.

Personally I suggest running a script during login to build the file
so it is current as to kernel and whatnot.

Re: unmounting at shut down, confusing situation ...

<op.18agemr1a3w0dxdave@hodgins.homeip.net>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=2090&group=alt.os.linux#2090

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: dwhodgins@nomail.afraid.org (David W. Hodgins)
Newsgroups: alt.os.linux
Subject: Re: unmounting at shut down, confusing situation ...
Date: Tue, 18 Jul 2023 13:33:48 -0400
Organization: A noiseless patient Spider
Lines: 29
Message-ID: <op.18agemr1a3w0dxdave@hodgins.homeip.net>
References: <u6pqcn$23fdi$1@dont-email.me> <u90km3$okpu$2@dont-email.me>
<u90nbc$p0bi$1@dont-email.me> <u91sd9$smvf$2@dont-email.me>
<7lfeojx3cb.ln2@Telcontar.valinor> <u936t7$14hlj$1@dont-email.me>
<op.179ji1uia3w0dxdave@hodgins.homeip.net> <u960g8$1l0ik$1@dont-email.me>
<rndiojx8l7.ln2@Telcontar.valinor>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="76ea7c713203f0d1f758fa56468f217c";
logging-data="1832917"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18DXNyEn2T/Te0RMZtdr+okZt3AcrbZBFY="
User-Agent: Opera Mail/12.16 (Linux)
Cancel-Lock: sha1:fS9rmDb65/XQKOgE+DIrytY9JQY=
 by: David W. Hodgins - Tue, 18 Jul 2023 17:33 UTC

On Tue, 18 Jul 2023 08:38:51 -0400, Carlos E.R. <robin_listas@es.invalid> wrote:

> On 2023-07-18 14:27, MarioCPPP wrote:
>> On 18/07/23 07:43, David W. Hodgins wrote:
>>> On Mon, 17 Jul 2023 06:58:47 -0400, MarioCPPP
>
>>> Finally got around to figuring out how to do this. :-)
>>>
>>> As root, create a service that will run at shutdown or reboot, just
> ............*******
>
>>> before
>>> the network stops.
>>>
>>> # cat /etc/systemd/system/reboot-or-shutdown.service
>>
>>
>> file or directory does not exist :(
>> OK, i'll look for sth similar under the path
>
> Which is the same I told you. *You* create the service file with several
> lines, and one is:
>
> ExecStop=/home/UtenteXXX/My/My/Scaricati/FreeNet/run.sh stop

I haven't checked to confirm it's needed, but I expect it most likely should
be run by the same user that started it, which is why I suggested using su -l.

Regards, Dave Hodgins

Re: unmounting at shut down, confusing situation ...

<op.18agb3loa3w0dxdave@hodgins.homeip.net>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=2091&group=alt.os.linux#2091

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: dwhodgins@nomail.afraid.org (David W. Hodgins)
Newsgroups: alt.os.linux
Subject: Re: unmounting at shut down, confusing situation ...
Date: Tue, 18 Jul 2023 13:32:17 -0400
Organization: A noiseless patient Spider
Lines: 74
Message-ID: <op.18agb3loa3w0dxdave@hodgins.homeip.net>
References: <u6pqcn$23fdi$1@dont-email.me> <u90km3$okpu$2@dont-email.me>
<u90nbc$p0bi$1@dont-email.me> <u91sd9$smvf$2@dont-email.me>
<7lfeojx3cb.ln2@Telcontar.valinor> <u936t7$14hlj$1@dont-email.me>
<op.179ji1uia3w0dxdave@hodgins.homeip.net> <u960g8$1l0ik$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="76ea7c713203f0d1f758fa56468f217c";
logging-data="1832917"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18ACSrq0a0VWYatBORiZ+rV5tFsMFAO1vQ="
User-Agent: Opera Mail/12.16 (Linux)
Cancel-Lock: sha1:ocVch/MmsuTKFQjjNvt3RIJwqNQ=
 by: David W. Hodgins - Tue, 18 Jul 2023 17:32 UTC

On Tue, 18 Jul 2023 08:27:52 -0400, MarioCPPP <NoliMihiFrangereMentulam@libero.it> wrote:

> On 18/07/23 07:43, David W. Hodgins wrote:
>> On Mon, 17 Jul 2023 06:58:47 -0400, MarioCPPP
>> <NoliMihiFrangereMentulam@libero.it> wrote:
>>> but that's a launcher to be used MANUALLY
>>> the launcher points to :
>>> /home/UtenteXXX/My/My/Scaricati/FreeNet/run.sh stop
>>> where do I have to add this command to have it executed
>>> early during shutdown process ?
>>> How to pass it to SystemD ?
>>
>> Finally got around to figuring out how to do this. :-)
>>
>> As root, create a service that will run at shutdown or
>> reboot, just before
>> the network stops.
>>
>> # cat /etc/systemd/system/reboot-or-shutdown.service
>
>
> file or directory does not exist :(
> OK, i'll look for sth similar under the path

That's the file I created for testing to ensure it works.
Create the file on your system.

>> [Unit]
>> Description=My service to do things at reboot or shutdown time
>> After=network.target
>> Before=systemd-reboot.service shutdown.target
>>
>> [Service]
>> Type=oneshot
>> ExecStart=/usr/bin/true
>> ExecStop=/root/somescript
>> RemainAfterExit=yes
>>
>> [Install]
>> WantedBy=sysinit.target
>>
>> Create the script. I used /root/somescript as the file name.
>> After creating
>> the script file don't forget to "chmod a+x
>> /root/somescript". To test this I
>> used ...
>> # cat /root/somescript
>> #!/bin/bash
>> /usr/bin/printf "$0 executed yyyyyyyyyyyyyyyyyyy"
>>
>> Note that the script runs as root and the output goes to the
>> journal.
>> I added the part of the string with the letter y repeated to
>> make it easy
>> to find when checking the journal output to confirm it ran
>> just before
>> stopping the network.
>>
>> Instead of the above, in your script put
>> #!/bin/bash
>> su -l UtenteXXX -c
>> '/home/UtenteXXX/My/My/Scaricati/FreeNet/run.sh stop'
>>
>> Also, instead of using /root/somescript, it would be better
>> to use something
>> like /usr/local/sbin/stopFreeNet as the file name for the
>> script and in the
>> ExecStop line of the service.
>>
>> Once you've created it run
>> # systemctl daemon-reload
>> # systemctl enable reboot-or-shutdown.service
>>
>> Regards, Dave Hodgins

Re: unmounting at shut down, confusing situation ...

<ia4jojxkgq.ln2@Telcontar.valinor>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=2092&group=alt.os.linux#2092

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: robin_listas@es.invalid (Carlos E.R.)
Newsgroups: alt.os.linux
Subject: Re: unmounting at shut down, confusing situation ...
Date: Tue, 18 Jul 2023 21:04:18 +0200
Lines: 47
Message-ID: <ia4jojxkgq.ln2@Telcontar.valinor>
References: <u6pqcn$23fdi$1@dont-email.me> <u90km3$okpu$2@dont-email.me>
<u90nbc$p0bi$1@dont-email.me> <u91sd9$smvf$2@dont-email.me>
<7lfeojx3cb.ln2@Telcontar.valinor> <u936t7$14hlj$1@dont-email.me>
<op.179ji1uia3w0dxdave@hodgins.homeip.net> <u960g8$1l0ik$1@dont-email.me>
<rndiojx8l7.ln2@Telcontar.valinor> <op.18agemr1a3w0dxdave@hodgins.homeip.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net 4DWbQNT3Hw125KEgHP/9Xwb9MeLYXbWyGDMhVdlxSWa6S+AAWb
X-Orig-Path: Telcontar.valinor!not-for-mail
Cancel-Lock: sha1:CCfR5Y9KMwQKkCoIG/R52bAi28M= sha256:fgSLrD5apxoMd6kOshhOAFtFcp1GzHizu7uLMc5hHH8=
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.9.1
Content-Language: es-ES, en-CA
In-Reply-To: <op.18agemr1a3w0dxdave@hodgins.homeip.net>
 by: Carlos E.R. - Tue, 18 Jul 2023 19:04 UTC

On 2023-07-18 19:33, David W. Hodgins wrote:
> On Tue, 18 Jul 2023 08:38:51 -0400, Carlos E.R.
> <robin_listas@es.invalid> wrote:
>
>> On 2023-07-18 14:27, MarioCPPP wrote:
>>> On 18/07/23 07:43, David W. Hodgins wrote:
>>>> On Mon, 17 Jul 2023 06:58:47 -0400, MarioCPPP
>>
>>>> Finally got around to figuring out how to do this. :-)
>>>>
>>>> As root, create a service that will run at shutdown or reboot, just
>> ............*******
>>
>>>> before
>>>> the network stops.
>>>>
>>>> # cat /etc/systemd/system/reboot-or-shutdown.service
>>>
>>>
>>> file or directory does not exist :(
>>> OK, i'll look for sth similar under the path
>>
>> Which is the same I told you. *You* create the service file with several
>> lines, and one is:
>>
>> ExecStop=/home/UtenteXXX/My/My/Scaricati/FreeNet/run.sh stop
>
> I haven't checked to confirm it's needed, but I expect it most likely
> should
> be run by the same user that started it, which is why I suggested using
> su -l.

systemd has its own method to use users.

[Service]
User=deepak
Group=admin
ExecStart=/opt/golinuxcloud/startup_script.sh

https://www.golinuxcloud.com/run-systemd-service-specific-user-group-linux/

--
Cheers, Carlos.

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor