#3079 PR merged: Don't mount /sys and other directories if already mounted

Labels: enhancement, bug, fixed / solved / done

pcahyna opened issue at 2023-11-13 18:04:

Pull Request Details:
  • Type: Bug Fix

  • Impact: High

  • Reference to related issue (URL): fixes #3017

  • How was this pull request tested?
    CI tested it - I enabled tests on Fedora 39 and Fedora Rawhide

  • Description of the changes in this pull request:
    Newer versions of systemd (starting with Fedora 39) seem to mount /sys themselves. Mounting it again leads to errors on the recovery system startup (startup scripts failing with status=219/CGROUP ), see https://github.com/rear/rear/issues/3017.

Check if /sys is already mounted using the mountpoint tool and mount it only if it is not.

Do the same for the other system mountpoints like /proc, /dev, /dev/pts. Not sure if they suffer from the same problem, but they probably could.

N.B. the mountpoint command is already among REQUIRED_PROGS.

pcahyna commented at 2023-11-14 15:46:

Forece pushed to correct a typo in commit message, no code changes.

[Export of Github issue for rear/rear.]