ansible: Add support for Debian trixie
[lttng-ci.git] / automation / ansible / roles / common-node / files / readonly_root_reboot.sh
CommitLineData
fe47937c
KS
1#!/usr/bin/bash
2
3IFS=',' read -r -a OPTIONS < <(findmnt --json / | jq -r '.[][0]["options"]')
4RO=
5for OPTION in "${OPTIONS[@]}" ; do
6 if [[ "${OPTION}" == "ro" ]] ; then
7 RO=0
8 break
9 fi
10done
11
12if [[ "${RO}" == "0" ]] ; then
13 echo "'/' is mounted read-only, rebooting"
14 shutdown -r "+1"
15fi
This page took 0.022089 seconds and 4 git commands to generate.