How can I power off usb storage device such as external HDD or flash drive without using dbus on GNU/Linux systems?

No replies
Joined: 10/27/2018

Hello, everybody!

I am a newbie on GNU/Linux systems.

As we all know, if you want to use usb storage device, you should firstly use the command "sudo mount" to mount it. If you want to unplug it, similarly, run the command "sudo umount" to unmount it from the mount point. Then run the command "sudo udisks --detach", the power of the usb device is completely off. Now you can safely remove it.

Unfortunately, both udisks and udisks2 depend on dbus.

Any alternative? I have tried "hdparm" and "sdparm", they can only spin the external HDDs down, but the LED lights of those devices are still on.

Why dbus-free? See the two links from Devuan as follows.

Therefore, the final hurdle of creating a dbus-free system for me is referred as above.

I hope some sophisticated guys can help me. Thanks!