mount_digiparts.sh: fix support to UBI volumes on systemd
According to udev documentation running programs that access to mount/umount filesystems is not allowed due to the default sandbox that is enforced on systemd-udevd.service, so on systemd systems we must to use systemd-mount binary instead of mount. Also systemd-mount does not support mount ubi devices by volume name, so we need to use the absolute device path. https://onedigi.atlassian.net/browse/DEL-8193 Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
This commit is contained in:
parent
120005ceeb
commit
5be7db1f9f
|
|
@ -95,7 +95,7 @@ elif [ "${SUBSYSTEM}" = "ubi" ]; then
|
||||||
# In the case of a 'system' partition with many UBI volumes, the device
|
# In the case of a 'system' partition with many UBI volumes, the device
|
||||||
# is always /dev/ubi0
|
# is always /dev/ubi0
|
||||||
# Mount the volume.
|
# Mount the volume.
|
||||||
if ! mount -t ubifs ubi0:${PARTNAME} ${MOUNT_PARAMS} ${MOUNTPOINT}; then
|
if ! ${MOUNT} -t ubifs ${DEVNAME} ${MOUNT_PARAMS} ${MOUNTPOINT}; then
|
||||||
logger -t udev "ERROR: Could not mount '${PARTNAME}' volume"
|
logger -t udev "ERROR: Could not mount '${PARTNAME}' volume"
|
||||||
rmdir --ignore-fail-on-non-empty ${MOUNTPOINT}
|
rmdir --ignore-fail-on-non-empty ${MOUNTPOINT}
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue