random

- collection of un-sorted bollocks
git clone git://git.acid.vegas/random.git
Log | Files | Refs | Archive

ovh6 (429B)

      1 #!/bin/sh
      2 _ADDRESS="2001:0000:000:0000:0:0:0:0000"
      3 _GATEWAY="2001:0000:0000:0000:0000:0000:0000:0000"
      4 _PERSIST=1
      5 
      6 if [ $_PERSIST -eq 1 ]; then
      7 	echo -r "[Match]\nName=eth0\n\n[Network]\nDHCP=ipv4\n\nAddress=$_ADDRESS\nGateway=$_GATEWAY\n\n[DHCP]\nUseMTU=true" > /etc/systemd/network/eth0-dhcp.network
      8 else
      9 	ip addr add $_ADDRESS/64 dev eth0 & ip -6 route add $_GATEWAY dev eth0 & ip -6 route add default via $_GATEWAY dev eth0
     10 fi