ALT Linux Bugzilla
– Attachment 5664 Details for
Bug 28181
перемонтировать файловые системы с EVMS-томов на обычные
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
cleaned up version
11-remount.sh (text/plain), 1.78 KB, created by
Michael Shigorin
on 2012-12-04 23:26:29 MSK
(
hide
)
Description:
cleaned up version
Filename:
MIME Type:
Creator:
Michael Shigorin
Created:
2012-12-04 23:26:29 MSK
Size:
1.78 KB
patch
obsolete
>#!/bin/sh ># remount EVMS-created volumes ># see https://bugzilla.altlinux.org/28181 > >ME=11-remount > >exec 2>/tmp/"$ME".log >&2 > >. install2-init-functions > >sync > ># these are normally missing in installer environment ># NB: /sbin writes rely on aufs in fact, would use /tmp otherwise ># but that might clobber cases when the binaries have to differ >for i in /sbin/{mdadm,lvm}; do > if [ ! -x "$i" -a -x "$destdir$i" ]; then > cp -p "$destdir$i" "$i" > fi >done > >if [ -f "$destdir/etc/lvm/lvm.conf" ]; then > mkdir -p /etc/lvm && > cp -p "$destdir/etc/lvm/lvm.conf" /etc/lvm >fi > >umount "$destdir/dev/pts" >chroot "$destdir" umount -a > >grep " $destdir" /proc/mounts | while read dev mnt rest; do umount "$mnt"; done > >umount "$destdir" || exit 1 > ># avoid automatic rpm shell.req dependency >MDADM=/sbin/mdadm >LVM=/sbin/lvm > >if [ -f /proc/mdstat -a -x "$MDADM" ]; then > "$MDADM" --examine --scan > /tmp/mdadm.conf > "$MDADM" --stop --scan >fi > ># evms_deactivate does essentially the same but is normally missing >dmsetup remove_all > >if [ -s /tmp/mdadm.conf -a -x "$MDADM" ]; then > # suitable arbitrary value of the year: packages already installed > sysctl -w dev.raid.speed_limit_max=1000000 > "$MDADM" --assemble --run --scan --config=/tmp/mdadm.conf >fi > >if [ -x "$LVM" ]; then > "$LVM" pvscan > "$LVM" vgscan > "$LVM" vgchange -ay --noudevsync >fi > ># created by 10-fstab.sh >rootfs="$(awk '{ if ($2=="/") print $1 }' < /tmp/fstab)" >case "$rootfs" in >UUID=*) > mount "`blkid -U ${rootfs#UUID=}`" $destdir > ;; >LABEL=*) > mount "`blkid -L ${rootfs#LABEL=}`" $destdir > ;; >/*) > mount "$rootfs" "$destdir" > ;; >*) > echo "$ME.sh: unknown rootfs: $rootfs" >&2 > exit 2 > ;; >esac > >mount -o bind /dev $destdir/dev >mount -t sysfs sysfs "$destdir/sys" >mount -t proc proc "$destdir/proc" >chroot "$destdir" mount -a ||: > ># NB: use "sleep 3600" here to debug :)
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 28181
:
5663
| 5664 |
5667
|
5668
|
5669
|
5670