mirror of
https://github.com/JasonN3/build-container-installer.git
synced 2025-12-25 19:07:54 +01:00
add sudo
This commit is contained in:
parent
cec31acbde
commit
c4e378d8ae
1 changed files with 7 additions and 6 deletions
|
|
@ -2,21 +2,22 @@
|
|||
|
||||
iso=$1
|
||||
|
||||
dnf install -y squashfs-tools
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y squashfs-tools
|
||||
|
||||
mkdir /mnt/{iso,install}
|
||||
sudo mkdir /mnt/{iso,install}
|
||||
|
||||
# Mount ISO
|
||||
mount -o loop $iso /mnt/iso
|
||||
sudo mount -o loop $iso /mnt/iso
|
||||
|
||||
# Mount squashfs
|
||||
mount -t squashfs -o loop /mnt/iso/images/install.img /mnt/install
|
||||
sudo mount -t squashfs -o loop /mnt/iso/images/install.img /mnt/install
|
||||
|
||||
FOUND_VERSION=$(cat /mnt/install/os-release | grep VERSION_ID | cut -d= -f2)
|
||||
|
||||
# Cleanup
|
||||
umount /mnt/install
|
||||
umount /mnt/iso
|
||||
sudo umount /mnt/install
|
||||
sudo umount /mnt/iso
|
||||
|
||||
if [[ ${FOUND_VERSION} != ${VERSION} ]]
|
||||
then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue