- device_mount_opts="rw,noatime"
- else
- device_mount_opts="ro,noatime"
+ # ... otherwise we mount it now
+ backing="${persistent_backing}/${device_name}"
+ mkdir -p "${backing}"
+ local device_fstype="$(get_fstype ${device})"
+ if [ -z "${PERSISTENT_READONLY}" ]
+ then
+ device_mount_opts="rw,noatime"
+ else
+ device_mount_opts="ro,noatime"
+ fi
+ if ! mount -t "${device_fstype}" -o "${device_mount_opts}" "${device}" "${backing}" >/dev/null 2>&1
+ then
+ log_warning_msg "Could not mount persistent media ${device} (${device_fstype})"
+ fi