1
0
Fork 0
mirror of https://github.com/YunoHost/moulinette.git synced 2025-09-23 00:48:35 +02:00

[fix] Use the classic way to create read-only bind mount in ynh_backup

This commit is contained in:
Jérôme Lebleu 2016-05-30 12:04:58 +02:00
commit 542a7a3b82

View file

@ -35,8 +35,7 @@ ynh_backup() {
if sudo mount --rbind "${SRCPATH}" "${DESTPATH}"; then if sudo mount --rbind "${SRCPATH}" "${DESTPATH}"; then
# try to remount destination directory as read-only # try to remount destination directory as read-only
sudo mount -o remount,ro "${DESTPATH}" >/dev/null 2>&1 \ sudo mount -o remount,ro,bind "${SRCPATH}" "${DESTPATH}" \
|| sudo mount -o remount,ro,bind "${SRCPATH}" "${DESTPATH}" \
|| true || true
return 0 return 0
else else