Bug 393632 - USB unmount should poweroff device too
Summary: USB unmount should poweroff device too
Status: RESOLVED DUPLICATE of bug 270808
Alias: None
Product: plasmashell
Classification: Plasma
Component: Disks & Devices (show other bugs)
Version: master
Platform: Manjaro Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-29 08:24 UTC by fademind
Modified: 2018-04-29 12:46 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description fademind 2018-04-29 08:24:31 UTC
Issue:
After unmount external hdd via applet, device is not poweroff automatically. 

Workaround:
Using `udisksctl power-off -b /dev/sdb` and so on. For safety poweroff external hdd after unmount.

Please consider allow poweroff external HDD after unmount them via applet.

For now I using this code:

#!/usr/bin/env bash

if [ "$(id -u)" = "0" ]; then
   echo "This script must be run as normal user" 1>&2
   exit 1
fi

if [ -e /dev/sdb ] ; then
    udisksctl unmount --block-device /dev/sdb1
    udisksctl power-off -b /dev/sdb
fi

if [ -e /dev/sdc ] ; then
    udisksctl unmount --block-device /dev/sdc1
    udisksctl power-off -b /dev/sdc
fi

if [ -e /dev/sdd ] ; then
    udisksctl unmount --block-device /dev/sdd1
    udisksctl power-off -b /dev/sdd
fi

but should be able to power off device after unmount.

Regards
Comment 1 Christoph Feck 2018-04-29 12:46:20 UTC

*** This bug has been marked as a duplicate of bug 270808 ***