1

Topic: udisksctl powe-off -b /dev/sd*

There is some command like this:

udisksctl powe-off -b /dev/sd*

2

Re: udisksctl powe-off -b /dev/sd*

No, as there is no udisks2 available at Hyperbola So I would try the opposite: What is the use-case you have in mind for this command? Perhaps there is a chance to reach something comparable for your use-case?

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

3

Re: udisksctl powe-off -b /dev/sd*

After unmounting a disk, this command turns off the drive, it does not appear in the "lsblk" list and to mount it again you have to plug it in.

4

Re: udisksctl powe-off -b /dev/sd*

The common known commands:

sync
umount

Those should be sufficient as udisks2 is just another layer above without a current need doing so. You can also use pmount in combination with spacefm for example when you want a graphical interface for the file-management. But in general as said: udisks2 is exactly the opposite point of what Hyperbola wants to offer and therefore also not available as it offers technical seen no further need or enhanced usage.

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

5

Re: udisksctl powe-off -b /dev/sd*

I didn't want to use udisks2, I wanted to know if there was a similar command...period!

6

Re: udisksctl powe-off -b /dev/sd*

I know but there is none as said. You can only recreate a comparable behavior. There is no comparable command or package providing a command alike to reach the same as this is as said udisks2 only. If we would want to replicate those known commands, we could also start including those packages with all the known issues and problems in the causing line. So I have only the possibility to scribble alternatives and proposals instead to replicate an alternative command.

If you have interest: It would be surely also possible to look into the code for udisks2, therefore also the call-stack of the command (program) and trying out to find possible ways forward. If you want a command from udisks2 you need to use that package / software or replicate it that near so you can have a comparable outcome. What we have learned since the release of Hyperbola 0.4: There are commands and packages not being possible to be replaced or imitated. They are Linux-only (without GNU also) and not available elsewhere. The command udisksctl is the udisks command line tool, only available there. Imitating or replicating it, is only possible to either research or rewrite ... or replace it with different sets of commands, different and more perhaps, but nearing.

I keep this thread so far open: Perhaps others have a different perspective on that matter or another solution? Eager and interested to hear and read about.

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

7

Re: udisksctl powe-off -b /dev/sd*

However, it is only a theory that this command, which "turns off" the unmounted disk without having to remove the cable, is safer. To be honest, I can live without it.

8

Re: udisksctl powe-off -b /dev/sd*

In the end no problem so far. But I understand your honest question and also the demand doing. So I like to leave this open for sure so everyone can leave a thought, or two or even more. We should always remember that only this way projects like libudev-zero getting into existence. Same for gettext-tiny. They are not all perfect, but here comes the thought from all of us together: We can enhance this, as this is free software. smile

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

9

Re: udisksctl powe-off -b /dev/sd*

How about the following sequence of commands:

$ doas sdparm --command=eject /dev/sdb
    /dev/sdb: Seagate   BUP Slim SL       0302
$ doas sdparm --command=stop /dev/sdb
    /dev/sdb: Seagate   BUP Slim SL       0302

When I use this combination of commands my Seagate USB hard drive appears to power down, the power LED indicator goes dark.  I have also tried the same commands with a Sandisk USB memory stick that also has an LED indicator, but in that case the LED stays illuminated.

10

Re: udisksctl powe-off -b /dev/sd*

Welcome back, happy to see you here. And thank you for providing this command-set.

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

11

Re: udisksctl powe-off -b /dev/sd*

thanks, i will try it.

12

Re: udisksctl powe-off -b /dev/sd*

Thanks, good to be here, and glad I could help out.