Skip to content
Snippets Groups Projects
Select Git revision
  • ae1d8689c9dcbfb7e28ecd5fe35488320b49dc65
  • master default protected
  • multiprocessing
  • experiment/clara
  • experiment/spec2B-poc
  • experiment/qivalio-poc
  • experiment/ertms
  • MAY-2023
  • FEB-2023
  • EGC-2023
  • 0.2.1
  • v0.2.0
  • v0.1.2
13 results

semantic-net.ttl

Blame
  • regenerate_hosts.sh 652 B
    #!/bin/bash
    BASE_MACS="6c:4b:90 a4:1f:72 78:45:c4 64:00:6a b0:83:fe d4:be:d9 00:23:24"
    arg="c8:1f:66"
    registry="/etc/registry/hosts"
    cp $registry $registry.bak
    for mac in $BASE_MACS
    do
        arg="$arg\| $mac"
    done
    echo grep "$arg" /var/lib/dhcp/dhcpd.leases
    MACS=""
    for line in $(grep "$arg" /var/lib/dhcp/dhcpd.leases | sort -u)
    do
        if [ "$line" != "hardware" ] && [ "$line" != "ethernet" ]
        then
            if [ -z "$(grep $line $registry)" ]
            then
                MACS="$MACS $(echo $line | sed 's/;$//g')"
            fi
        fi
    done
    for mac in $MACS
    do
        echo "20191025 $mac inconnuAutoGen" >> $registry
    done
    systemctl restart registry wakeonlan