A Script That Only Works From Its Own Folder
/opt/lantern/bin/lantern.sh loads ../lib/common.sh and reads ../data/regions.txt. It works when you cd /opt/lantern/bin first, but from anywhere else (or through the link /usr/local/bin/lantern) it fails with "No such file or directory".
Change /opt/lantern/bin/lantern.sh so that it works:
/usr/local/bin/lantern (by name, via PATH),and still finds the files in /opt/lantern/lib and /opt/lantern/data. Don't hard-code /opt/lantern in the script, and don't move the files: the tool is also installed elsewhere on other machines.
About this machine
Ubuntu 24.04 with no internet access. You are student with passwordless sudo. The grader checks the final state of the machine, not the commands you typed. Values like names and ports are generated for you.
Teaching or writing about this? Embed this lab on your page
Your machine is ready to start
A fresh, isolated Ubuntu machine boots in a few seconds with the task already set up.
No account needed: 3 of 3 free tries left. Guest machines last 30 minutes.