dermotbradley/create-alpine-disk-image

Erronous check for `/dev/loop-control`

Closed this issue · 1 comments

The image script uses the folowing test

write_log "Ensuring that loop driver is loaded (if necessary)" 2
if [ ! -f /dev/loop-control ]; then

However, -f tests for regular files and not character devices, which loop-control is.

# ls -l /dev/loop-control
crw-rw---- 1 root root 10, 237 Jul 15 11:24 /dev/loop-control

Therefore the script should be using -e insteadn

write_log "Ensuring that loop driver is loaded (if necessary)" 2
if [ ! -e /dev/loop-control ]; then

Fixed by #44 using "-c" rather than "-e".