Skip to content
This repository has been archived by the owner on Aug 20, 2022. It is now read-only.

Commit

Permalink
Extra saftey for mount of /dev/sr0
Browse files Browse the repository at this point in the history
  • Loading branch information
bathomas committed Feb 23, 2018
1 parent 8a4ea3c commit 349bd2e
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions scripts/update_VGA.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Script to install/update VirtualBox Guest Additions on a Linux system.
#
# Authors: Kris Thielemans and Ben Thomas
# Copyright 2017 University College London
# Copyright 2017-2018 University College London
#
# This is software developed for the Collaborative Computational
# Project in Positron Emission Tomography and Magnetic Resonance imaging
Expand Down Expand Up @@ -52,15 +52,11 @@ else
VGArun=/media/*/VBOXADDITIONS*/VBoxLinuxAdditions.run
else
echo "CD still not found. Trying /dev/sr0 !" >> /dev/stderr
mkdir -p /media/cdrom

if [ ! -e /media/cdrom ]; then
mkdir -p /media/cdrom
fi

mount /dev/sr0 /media/cdrom
ARGS="mount -t iso9660 /dev/sr0 /media/cdrom"

ERRORCODE=$?
if [ $? -ne 1 ]; then
if eval $ARGS ; then
if [ -r /media/cdrom/VBoxLinuxAdditions.run ]; then
VGArun=/media/cdrom/VBoxLinuxAdditions.run
else
Expand Down

0 comments on commit 349bd2e

Please sign in to comment.