docker-scripts-archived / dev--LTSP

Virtual LTSP server with vagrant and/or docker-scripts.
GNU General Public License v3.0
7 stars 6 forks source link

Improve settings.sh #59

Closed dashohoxha closed 6 years ago

dashohoxha commented 6 years ago
d78ui98 commented 6 years ago

Based on above comment I am planning to create settings.sh file something like this

# mode of operation. yes for standalone mode. no for normal mode
# refer this - https://github.com/docker-scripts/dev--LTSP/wiki/LTSP-Modes-of-Operation 
STANDALONE="yes"

# IP address of ltsp server
LAN_IP="192.168.111.16"
NETWORK="$(echo $LAN_IP | cut -d'.' -f1-3)"

# Interface used by ltsp server, client and dhcp server. 
# Will be automatically set by test.sh.
LAN_IF=""

# List of extra packages to be installed on ltsp server.
PACKAGES="vim"

this has been tested internally. also replaced INTERFACE with LAN_IF in both the Vagrantfiles and test.sh script.

dashohoxha commented 6 years ago

The line of NETWORK may not work on Ruby. Add at least 2 extra packages for proper testing. Look at the other tasks/issues in case there is anything else that needs to be added on settings.sh

d78ui98 commented 6 years ago

I just tested NETWORK line does work well. (as stuff inside it is in double quotes)

d78ui98 commented 6 years ago

Look at the other tasks/issues in case there is anything else that needs to be added on settings.sh

just have to enable debugging. Something I plan on doing later when solve #58

dashohoxha commented 6 years ago

I just tested NETWORK line does work well. (as stuff inside it is in double quotes)

You mean that Ruby does $ shell expansion?

just have to enable debugging.

Do this before testing.

d78ui98 commented 6 years ago

You mean that Ruby does $ shell expansion?

no. NETWORK is not used by Vagrantfile. Putting it inside double quotes make it a normal ruby variable.

If I write puts NETWORK in vagrantfile it would print out (echo $LAN_IP | cut -d'.' -f1-3). while in bash script it will do shell expansion and get network address.

dashohoxha commented 6 years ago

You are right. But nonetheless it defeats the purpose of a configuration file. You can do that calculation on the bash script instead.

d78ui98 commented 6 years ago

Sure. I can do that.