mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
fix remove
This commit is contained in:
parent
38494d20c9
commit
c8682aa986
1 changed files with 5 additions and 4 deletions
|
@ -209,10 +209,11 @@ elif [ "$1" = remove ]; then
|
|||
# A block or partition device has been removed.
|
||||
# Test if it is mounted.
|
||||
while read device mountpoint fstype remainder; do
|
||||
if [ "$DEVNAME" = "$device" ]; then
|
||||
# If the mountpoint and filesystem type are maintained by
|
||||
# this script, unmount the filesystem.
|
||||
if in_list "$mountpoint" "$MOUNTPOINTS" &&
|
||||
if [ "/$DEVNAME" = "$device" ]; then
|
||||
log debug "umount device is $device"
|
||||
# If the mountpoint and filesystem type are maintained by
|
||||
# this script, unmount the filesystem.
|
||||
if in_list "$mountpoint" "$MOUNTPOINTS" &&
|
||||
in_list "$fstype" "$FILESYSTEMS"; then
|
||||
log info "executing command: umount -l $mountpoint"
|
||||
umount -l "$mountpoint"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue