Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.5:Update
libguestfs.13264
mount-rootfs-and-chroot.sh
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File mount-rootfs-and-chroot.sh of Package libguestfs.13264
#!/bin/bash # Usage: $0 /dev/sda5 rootfs=$1 mnt=/sysroot mounts= if test -b "${rootfs}" then mkdir -v -p "${mnt}" if mount -v "${rootfs}" "${mnt}" then for i in dev dev/pts proc sys selinux do if test -d /${i} && test -d "${mnt}/${i}" && test "`stat -c %D /`" != "`stat -c %D ${i}`" then mount -v --bind /${i} "${mnt}/${i}" fi done chroot "${mnt}" su - while read b m rest do case "${m}" in ${mnt}*) mounts="${m} ${mounts}" ;; esac done <<-EOF ` cat < /proc/mounts ` EOF for i in ${mounts} do umount -v "${i}" done fi fi
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor