From b0126b46c3bdef0188d6acf16e9525736305e751 Mon Sep 17 00:00:00 2001 From: Jybz Date: Sat, 20 Apr 2024 22:46:01 +0200 Subject: Updated to ensure shutdown message is displayed on current tty. - origin: https://svnweb.mageia.org/packages/cauldron/dracut/current/SOURCES/0511-mgalive-A-module-to-mount-Mageia-Live-media.patch?r1=1653914&r2=1663927 - mgalive: ensure shutdown message is displayed on current tty --- modules.d/90mgalive/mgalive-shutdown.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'modules.d') diff --git a/modules.d/90mgalive/mgalive-shutdown.sh b/modules.d/90mgalive/mgalive-shutdown.sh index afb3f9a..d587fb0 100644 --- a/modules.d/90mgalive/mgalive-shutdown.sh +++ b/modules.d/90mgalive/mgalive-shutdown.sh @@ -1,8 +1,10 @@ -#!/bin/sh -clear +#!/usr/bin/sh + basedev=$(cat /run/mgalive/basedev) if strstr "$basedev" "/dev/sr" ; then + exec < /dev/tty0 > /dev/tty0 eject $basedev + clear echo "It is now safe to remove the Live medium" echo "Press to continue..." read -t 30 a -- cgit v1.2.1