summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordd <dd@wx.tnyzeq.icu>2024-07-12 07:35:09 +0200
committerdd <dd@wx.tnyzeq.icu>2024-07-12 07:35:09 +0200
commit4370312566cbcd3d20cd4d3b4a74d44fe16053d3 (patch)
treee9ffc6e4f96bc38e1ac2e92e63199fd5b7794799
parentf7d7f2073598fe93c1bd36e3530d8500a04b9bf1 (diff)
downloadvyos-jenkins-4370312566cbcd3d20cd4d3b4a74d44fe16053d3.tar.gz
vyos-jenkins-4370312566cbcd3d20cd4d3b4a74d44fe16053d3.zip
updated de-branding to allow custom name
-rwxr-xr-xbuild-iso.sh15
-rw-r--r--readme.md6
2 files changed, 14 insertions, 7 deletions
diff --git a/build-iso.sh b/build-iso.sh
index 4cdb17a..dc66470 100755
--- a/build-iso.sh
+++ b/build-iso.sh
@@ -39,21 +39,26 @@ echo "Checking out the $BRANCH branch..."
git checkout "$BRANCH" > /dev/null 2>&1
function HandleBranding {
- if [ "$NOT_VYOS" == "yes" ]; then
+ if [ "$NOT_VYOS" != "" ]; then
+ name="$NOT_VYOS"
+ if [ "$name" == "yes" ]; then
+ name="NOTvyos"
+ fi
+
echo "Removing branding..."
cp ../extras/not-vyos/splash.png ./data/live-build-config/includes.binary/isolinux/splash.png
- sed -i 's/VyOS/NOTvyos/' ./data/live-build-config/includes.binary/isolinux/menu.cfg
+ sed -i "s/VyOS/$name/" ./data/live-build-config/includes.binary/isolinux/menu.cfg
defaultToml="./data/defaults.toml"
if [ -f "$defaultToml" ]; then
sed -i -E 's/website_url =.*/website_url = "localhost"/' "$defaultToml"
sed -i -E 's/support_url =.*/support_url = "There is no official support."/' "$defaultToml"
sed -i -E 's/bugtracker_url =.*/bugtracker_url = "DO NOT report bugs to VyOS!"/' "$defaultToml"
- sed -i -E 's/project_news_url =.*/project_news_url = "This is unofficial NOTvyos build."/' "$defaultToml"
+ sed -i -E "s/project_news_url =.*/project_news_url = \"This is unofficial $name build.\"/" "$defaultToml"
fi
defaultMotd="./data/live-build-config/includes.chroot/usr/share/vyos/default_motd"
if [ -f "$defaultMotd" ]; then
- sed -i 's/VyOS/NOTvyos/' "$defaultMotd"
- sed -i -E 's/Check out project news at.*/This is unofficial NOTvyos build./' "$defaultMotd"
+ sed -i "s/VyOS/$name/" "$defaultMotd"
+ sed -i -E "s/Check out project news at.*/This is unofficial $name build./" "$defaultMotd"
sed -i -E 's/and feel free to report bugs at.*/DO NOT report bugs to VyOS!/' "$defaultMotd"
fi
fi
diff --git a/readme.md b/readme.md
index 95220ba..5615891 100644
--- a/readme.md
+++ b/readme.md
@@ -92,8 +92,10 @@ export BRANCH="sagitta"
**If you want to distribute ISO**
Then you should remove VyOS branding, you can do this by configuring `NOT_VYOS` environment variable to `yes`
-before you run any script. Beware - by default, the ISO will include VyOS branding thus you shall not distribute
-the ISO. This setting is remembered, you can override by defining empty value.
+before you run any script. If you set `yes` then `NOTvyos` name would be used as replacement for VyOS. If you
+set any other non-empty value like `someos` then this name would be used instead of `NOTvyos`.
+Beware - by default, the ISO will include VyOS branding thus you shall not distribute the ISO. This setting
+is remembered, you can override by defining empty value.
```bash
export NOT_VYOS="yes"