czechlight-cfg-fs: allow override some variables
This will be used for testing the script, when it is run outside of the
expected environment. The other possibility was to pass those values as
script args and add them to service file but I don't think it makes any
difference.
Change-Id: Ie64c0a2cb285b7a6cbdddda113b31bee7fa7f582
diff --git a/package/czechlight-cfg-fs/czechlight-install-yang.sh b/package/czechlight-cfg-fs/czechlight-install-yang.sh
index d8a11ed..6c9f829 100755
--- a/package/czechlight-cfg-fs/czechlight-install-yang.sh
+++ b/package/czechlight-cfg-fs/czechlight-install-yang.sh
@@ -7,10 +7,11 @@
YANG_INLINE=0
YANG_CALIBRATION=0
-CLA_YANG=/usr/share/cla-sysrepo/yang
-VELIA_YANG=/usr/share/velia/yang
+CLA_YANG="${CLA_YANG:-/usr/share/cla-sysrepo/yang}"
+VELIA_YANG="${VELIA_YANG:-/usr/share/velia/yang}"
+PROC_CMDLINE="${PROC_CMDLINE:-/proc/cmdline}"
-for ARG in $(cat /proc/cmdline); do
+for ARG in $(cat "$PROC_CMDLINE"); do
case "${ARG}" in
czechlight=*)
CZECHLIGHT="${ARG:11}"