File: assertion.sh

package info (click to toggle)
dracut 110-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,416 kB
  • sloc: sh: 24,901; ansic: 5,236; makefile: 346; perl: 186; python: 48; javascript: 19
file content (12 lines) | stat: -rwxr-xr-x 579 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh

# required binaries: grep sync

# Check for both new (rd.overlay) and deprecated (rd.live.overlay) parameter names
if grep -qE ' rd\.(live\.)?overlay=LABEL=persist ' /proc/cmdline; then
    # Writing to a file in the root filesystem lets test_run() verify that the autooverlay module successfully created
    # and formatted the overlay partition and that the dmsquash-live module used it when setting up the rootfs overlay.
    echo "dracut-autooverlay-success" > /overlay-marker
    # Ensure the marker is flushed to disk before shutdown
    sync /overlay-marker
fi