#!/bin/bash
## kola:
##   exclusive: false

set -xeuo pipefail

. $KOLA_EXT_DATA/commonlib.sh

for part in /sysroot /boot; do
    if ! findmnt -n -o options ${part} | grep -q "ro,"; then
        fatal "${part} is missing ro option"
    fi
    if test -w "${part}" || touch "${part}/somefile" 2>/dev/null; then
        fatal "${part} is writable"
    fi
done
ok read-only partitions
