Comment 1 for bug 198007

Revision history for this message
Agostino Russo (ago) wrote :

take-2:

loopfile_fstab_line=$(sed -n '\:^/[^ ]*[ ]*[ ]/[ ][ ]*[^ ]*[ ].*loop.*[ ]:p' /etc/fstab)
host_mountpoint=${loopfile_fstab_line%% *}
while [ -z "$host_device" ] && [ -n "$host_mountpoint" ] && [ ! "$host_mountpoint" = "/" ]; do
    host_mountpoint=${host_mountpoint%/*}
    host_device=$(sed -n "\:^/[^ ]* $host_mountpoint :p" /proc/mounts)
done