Fix coding style in archiso hook
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
This commit is contained in:
parent
211f201644
commit
6462dc6e70
@ -1,6 +1,5 @@
|
|||||||
# args: source, mountpoint
|
# args: source, mountpoint
|
||||||
_mnt_bind()
|
_mnt_bind() {
|
||||||
{
|
|
||||||
src="${1}"
|
src="${1}"
|
||||||
mnt="${2}"
|
mnt="${2}"
|
||||||
msg "::: Binding ${src} to ${mnt}"
|
msg "::: Binding ${src} to ${mnt}"
|
||||||
@ -8,9 +7,8 @@ _mnt_bind()
|
|||||||
/bin/mount -o bind "${src}" "${mnt}"
|
/bin/mount -o bind "${src}" "${mnt}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# args: /path/to/image_file
|
# args: /path/to/image_file, mountpoint
|
||||||
_mnt_squashfs()
|
_mnt_squashfs() {
|
||||||
{
|
|
||||||
img="${1}"
|
img="${1}"
|
||||||
mnt="${2}"
|
mnt="${2}"
|
||||||
img_fullname="${img##*/}";
|
img_fullname="${img##*/}";
|
||||||
@ -34,8 +32,7 @@ _mnt_squashfs()
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
run_hook ()
|
run_hook () {
|
||||||
{
|
|
||||||
if [ "x${arch}" = "x" ]; then
|
if [ "x${arch}" = "x" ]; then
|
||||||
arch="$(uname -m)"
|
arch="$(uname -m)"
|
||||||
fi
|
fi
|
||||||
@ -59,7 +56,7 @@ run_hook ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
archiso_mount_handler() {
|
archiso_mount_handler() {
|
||||||
newroot="$1"
|
newroot="${1}"
|
||||||
|
|
||||||
msg -n ":: Mounting tmpfs, size=${tmpfs_size}..."
|
msg -n ":: Mounting tmpfs, size=${tmpfs_size}..."
|
||||||
mount -t tmpfs -o "size=${tmpfs_size}" tmpfs /tmpfs
|
mount -t tmpfs -o "size=${tmpfs_size}" tmpfs /tmpfs
|
||||||
@ -67,10 +64,10 @@ archiso_mount_handler() {
|
|||||||
|
|
||||||
msg ":: Waiting for boot device..."
|
msg ":: Waiting for boot device..."
|
||||||
while ! poll_device ${archisodevice} 30; do
|
while ! poll_device ${archisodevice} 30; do
|
||||||
echo "ERROR: boot device didn't show up after 30 seconds..."
|
echo "ERROR: boot device didn't show up after 30 seconds..."
|
||||||
echo " Falling back to interactive prompt"
|
echo " Falling back to interactive prompt"
|
||||||
echo " You can try to fix the problem manually, log out when you are finished"
|
echo " You can try to fix the problem manually, log out when you are finished"
|
||||||
launch_interactive_shell
|
launch_interactive_shell
|
||||||
done
|
done
|
||||||
|
|
||||||
FSTYPE=$(blkid -o value -s TYPE ${archisodevice} 2> /dev/null)
|
FSTYPE=$(blkid -o value -s TYPE ${archisodevice} 2> /dev/null)
|
||||||
@ -99,7 +96,7 @@ archiso_mount_handler() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
msg ":: Mounting root (aufs) filesystem"
|
msg ":: Mounting root (aufs) filesystem"
|
||||||
/bin/mount -t aufs -o dirs=/tmpfs=rw none $newroot
|
/bin/mount -t aufs -o dirs=/tmpfs=rw none "${newroot}"
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "ERROR: while mounting root (aufs) filesystem."
|
echo "ERROR: while mounting root (aufs) filesystem."
|
||||||
exit 1
|
exit 1
|
||||||
|
Loading…
Reference in New Issue
Block a user