ALT Linux Bugzilla
– Attachment 16807 Details for
Bug 51235
sysvinit/reboot не работает с отдельным /usr после обновления p10 -> p11
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
A proposed fix v2
file_51235.txt (text/plain), 2.26 KB, created by
Arseny Maslennikov
on 2024-09-06 14:25:18 MSK
(
hide
)
Description:
A proposed fix v2
Filename:
MIME Type:
Creator:
Arseny Maslennikov
Created:
2024-09-06 14:25:18 MSK
Size:
2.26 KB
patch
obsolete
>From 641fb51a1aa490bc7b5fcaf5ed97bdde144bb38a Mon Sep 17 00:00:00 2001 >From: Arseny Maslennikov <arseny@altlinux.org> >Date: Fri, 6 Sep 2024 14:10:05 +0300 >Subject: [PATCH startup.git v2] halt: treat /usr as / >To: devel@lists.altlinux.org > >If /usr is its own mountpoint, we have to treat it as one of the last >remaining filesystems before the system is halted, since it e. g. hosts >/usr/sbin/reboot. > >Link: https://bugzilla.altlinux.org/51235 >Link: https://altlinux.org/Usrmerge >Suggested-by: Sergey Y. Afonin <asy@altlinux.org> >Signed-off-by: Arseny Maslennikov <arseny@altlinux.org> >--- > startup/rc.d/init.d/halt | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > >diff --git a/startup/rc.d/init.d/halt b/startup/rc.d/init.d/halt >index 1464d08..8e0eacf 100755 >--- a/startup/rc.d/init.d/halt >+++ b/startup/rc.d/init.d/halt >@@ -148,19 +148,19 @@ SWAPS=`awk '! /^Filename/ { print $1 }' /proc/swaps` > > # Unmount supermount and autofs*. > UnmountFilesystems 3 5 \ >- '$2 != "/" && (($3 == "supermount") || ($3 == "autofs") || ($3 == "autofs4")) {print $2}' \ >+ '$2 != "/" && $2 != "/usr" && ($3 ~ "^(supermount|autofs[0-9]*)$") {print $2}' \ > 'Unmounting automount filesystem' \ > 'Unmounting automount filesystem (retry)' > > # Unmount loopback stuff first. > UnmountFilesystems 3 5 \ >- '$2 != "/" && $1 ~ /^\/dev\/loop/ {print $2}' \ >+ '$2 != "/" && $2 != "/usr" && $1 ~ /^\/dev\/loop/ {print $2}' \ > 'Unmounting loopback filesystem' \ > 'Unmounting loopback filesystem (retry)' > > # Unmount all the rest. > UnmountFilesystems 3 5 \ >- '$2 != "/" && $2 !~ /^\/(dev|proc|sys)(\/.*)?$/ && $1 !~ /^none$/ {print $2}' \ >+ '$2 != "/" && $2 != "/usr" && $2 !~ /^\/(dev|proc|sys)(\/.*)?$/ && $1 !~ /^none$/ {print $2}' \ > 'Unmounting filesystem' \ > 'Unmounting filesystem (retry)' > >@@ -188,6 +188,9 @@ fi > # Unmount and remount read-only anything that's left mounted. > action 'Remounting remaining filesystems (if any) read-only:' \ > umount -afnr -t noproc,nosysfs,notmpfs,nodevfs,nodevtmpfs,nousbfs,norpc_pipefs,nonfsd >+if mountpoint -q /usr; then >+ action 'Remounting usr filesystem read-only:' mount -n -o remount,ro /usr >+fi > action 'Remounting root filesystem read-only:' mount -n -o remount,ro / > > # See if this is a powerfail situation. >-- >2.45.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 51235
:
16672
|
16806
| 16807