diff options
author | Ibrahim Mkusa <ibrahimmkusa@gmail.com> | 2024-08-10 19:25:56 -0400 |
---|---|---|
committer | Ibrahim Mkusa <ibrahimmkusa@gmail.com> | 2024-08-10 19:25:56 -0400 |
commit | 6dfbd4e4a050ec1ba0f7604861ea86f6be9064be (patch) | |
tree | a5e8feb50a19498c0fbab9b24d54ba13ae6cebc6 /repo | |
parent | cdfd73bc8014c2b33186358db09a6cb8164e31b8 (diff) |
sudo cat -> sudo tee to properly handle priviledge
Diffstat (limited to 'repo')
-rw-r--r-- | repo/add_repo_from_iso.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/repo/add_repo_from_iso.sh b/repo/add_repo_from_iso.sh index d1b9625..0eb1d3c 100644 --- a/repo/add_repo_from_iso.sh +++ b/repo/add_repo_from_iso.sh @@ -12,7 +12,7 @@ sudo dd if=$if of=$of bs=1M status='progress' # Automount iso contents to repo_location to have available to machine # unquoted delimiter in the here doc allows variable substitution -sudo cat >> /etc/fstab <<EOF +sudo tee /etc/fstab <<EOF $of $repo_location iso9660 defaults 0 0 EOF @@ -22,14 +22,14 @@ ls $repo_location # Assumes a fedora family OS but similar changes can be made in debian family # Makes dnf aware of newly available repos -sudo cat > /etc/yum.repos.d/base.repo <<EOF +sudo tee /etc/yum.repos.d/base.repo <<EOF [BaseOS] name=BaseOS baseurl=file://$repo_location/BaseOS gpgcheck=0 EOF -sudo cat > /etc/yum.repos.d/appstream.repo <<EOF +sudo tee /etc/yum.repos.d/appstream.repo <<EOF [AppStream] name=AppStream baseurl=file://$repo_location/AppStream |