diff options
author | tv <tv@shackspace.de> | 2015-05-21 01:56:08 +0200 |
---|---|---|
committer | tv <tv@shackspace.de> | 2015-05-21 01:56:08 +0200 |
commit | 36670f3e1cccad579b994a29320eeb8e287803b7 (patch) | |
tree | 484cb2c1075cdcabe8020ca40704f4d68f2b2fed /lib/cacnixos.sh | |
parent | b95a514bcced00af77ae4adab77326dba9ab4c36 (diff) |
sh: functions -> bin/
Diffstat (limited to 'lib/cacnixos.sh')
-rw-r--r-- | lib/cacnixos.sh | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/lib/cacnixos.sh b/lib/cacnixos.sh deleted file mode 100644 index 24502d694..000000000 --- a/lib/cacnixos.sh +++ /dev/null @@ -1,28 +0,0 @@ -. ./lib/net.sh - -# cacnixos_networking : cac-server x hostname -> nixos-module -cacnixos_networking() {( - server=$1 - hostname=$2 - - address=$(echo $server | jq -r .ip) - gateway=$(echo $server | jq -r .gateway) - nameserver=8.8.8.8 - netmask=$(echo $server | jq -r .netmask) - prefix=$(net_netmask_to_prefix $netmask) - - printf '{...}:\n' - printf '{\n' - printf ' networking.hostName = "%s";\n' $hostname - printf ' networking.interfaces.enp2s1.ip4 = [\n' - printf ' {\n' - printf ' address = "%s";\n' $address - printf ' prefixLength = %d;\n' $prefix - printf ' }\n' - printf ' ];\n' - printf ' networking.defaultGateway = "%s";\n' $gateway - printf ' networking.nameservers = [\n' - printf ' "%s"\n' $nameserver - printf ' ];\n' - printf '}\n' -)} |