From 808e13bc1baed95ebfef2e768cdf5b5a2e2af17a Mon Sep 17 00:00:00 2001 From: bin456789 Date: Wed, 23 Sep 2026 21:45:04 +0800 Subject: [PATCH] =?UTF-8?q?alpine:=20=E4=B8=B4=E6=97=B6=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=20liveos=20getty=20=E8=BF=90=E8=A1=8C=E5=9C=A8=20tty0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- reinstall.sh | 14 ++++++++++++++ trans.sh | 18 ++++-------------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/reinstall.sh b/reinstall.sh index 5f663c1..d9f2fed 100644 --- a/reinstall.sh +++ b/reinstall.sh @@ -368,6 +368,10 @@ insert_into_file() { case "$location" in before) line_num=$((line_num - 1)) ;; + replace) + sed -i "${line_num}d" "$file" + line_num=$((line_num - 1)) + ;; after) ;; *) return 1 ;; esac @@ -4351,6 +4355,16 @@ EOF insert_into_file init before '^exec (/bin/busybox )?switch_root' <