diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2017-05-22 21:56:04 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2017-05-22 21:56:04 +0000 |
commit | 82d0f92ab8b84466ae20ab919c1f9c3577b5cecb (patch) | |
tree | 776015ae6c6a386125b2d39e13b62f91b99548f8 /sub/layout/configure-localoptions | |
download | lh-bootstrap-82d0f92ab8b84466ae20ab919c1f9c3577b5cecb.tar.xz |
Initial commit
Diffstat (limited to 'sub/layout/configure-localoptions')
-rwxr-xr-x | sub/layout/configure-localoptions | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sub/layout/configure-localoptions b/sub/layout/configure-localoptions new file mode 100755 index 0000000..451fcce --- /dev/null +++ b/sub/layout/configure-localoptions @@ -0,0 +1,20 @@ +#!/bin/sh -e + +output="$1" +countrycode="$2" +localip="$3" +routerip="$4" + +case "$countrycode" in + fr) timezone=Europe/Paris ;; + uk) timezone=Europe/London ;; + rs) timezone=Europe/Belgrade ;; + cn) timezone=Asia/Shanghai ;; + vn) timezone=Asia/Saigon ;; + *) echo "invalid countrycode: please choose fr, uk, rs, cn or vn" 1>&2 ; exit 100 ;; +esac + +echo "$countrycode" > $output/rootfs/etc/s6-linux-init/env-stage2/COUNTRY_CODE +echo "$localip" > $output/rootfs/etc/s6-linux-init/env-stage2/ETH0_IP4 +echo "$routerip" > $output/rootfs/etc/s6-linux-init/env-stage2/DEFAULT_ROUTER_IP4 +echo ":$timezone" > $output/rootfs/etc/s6-linux-init/env/TZ |