# Should-Stop: halt reboot kexec
# Short-Description: Mount the root filesystem read-only.
. /lib/lsb/init-functions
[ "$VERBOSE" = no ] || log_action_begin_msg "Mounting root filesystem read-only"
[ "$(uname -s)" = "GNU/kFreeBSD" ] && MOUNT_FORCE_OPT=-f
# mount -n -o remount,ro /
# will act on a bind mount of / if there is one.
# See #339023 and the comment in checkroot.sh
mount $MOUNT_FORCE_OPT -n -o remount,ro -t dummytype dummydev / 2>/dev/null \
|| mount $MOUNT_FORCE_OPT -n -o remount,ro dummydev / 2>/dev/null \
|| mount $MOUNT_FORCE_OPT -n -o remount,ro /
[ "$VERBOSE" = no ] || log_action_end_msg $ES
restart|reload|force-reload)
echo "Error: argument '$1' not supported" >&2