Fix syntax errors with custom installs #65

Closed
stickz wants to merge 1 commit from patch-1 into master
stickz commented 2022-12-30 21:33:30 +01:00 (Migrated from github.com)

This commit gracefully fixes syntax errors for custom installations. It allows the install image script to continue as expected.

  1. Fixed a bug with image version string. If the image file doesn't have a version, gracefully set it to 0.
  2. Fixed a bug with the debian_version file not being present. If it doesn't exist, gracefully set the debian version to 0.

I tested this on my hetzner dedicated server inside the rescue system. It works as expected. I created a testing environment to successfully do this.

Side Note: cut -d "-" -f 2 will not cut anything, if the image file doesn't contain a version. I checked for the tar keyword to determine this. I used a wildcard that will work more frequently. Checking h.net.tar.gz is no longer required.

This commit gracefully fixes syntax errors for custom installations. It allows the install image script to continue as expected. 1) Fixed a bug with image version string. If the image file doesn't have a version, gracefully set it to 0. 2) Fixed a bug with the debian_version file not being present. If it doesn't exist, gracefully set the debian version to 0. I tested this on my hetzner dedicated server inside the rescue system. It works as expected. I created a testing environment to successfully do this. **Side Note:** `cut -d "-" -f 2` will not cut anything, if the image file doesn't contain a version. I checked for the `tar` keyword to determine this. I used a wildcard that will work more frequently. Checking `h.net.tar.gz` is no longer required.
asciiprod commented 2023-09-22 14:14:25 +02:00 (Migrated from github.com)

Please use the correct naming scheme for your images. This code path is likely to be removed soonish.
https://docs.hetzner.com/robot/dedicated-server/operating-systems/installing-custom-images/#install-older-linux-images-using-the-installimage-script

Please use the correct naming scheme for your images. This code path is likely to be removed soonish. https://docs.hetzner.com/robot/dedicated-server/operating-systems/installing-custom-images/#install-older-linux-images-using-the-installimage-script

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
DiamantTh/installimage!65
No description provided.