mirror of
https://github.com/JasonN3/build-container-installer.git
synced 2025-12-25 10:57:55 +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
|
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 ISO
|
||||||
mount -o loop $iso /mnt/iso
|
sudo mount -o loop $iso /mnt/iso
|
||||||
|
|
||||||
# Mount squashfs
|
# 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)
|
FOUND_VERSION=$(cat /mnt/install/os-release | grep VERSION_ID | cut -d= -f2)
|
||||||
|
|
||||||
# Cleanup
|
# Cleanup
|
||||||
umount /mnt/install
|
sudo umount /mnt/install
|
||||||
umount /mnt/iso
|
sudo umount /mnt/iso
|
||||||
|
|
||||||
if [[ ${FOUND_VERSION} != ${VERSION} ]]
|
if [[ ${FOUND_VERSION} != ${VERSION} ]]
|
||||||
then
|
then
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue