#!/bin/bash

service apport stop &
hostname rpi$(sed "s/^.*macaddr=\([0-9A-F:]*\).*$/\1/" /proc/cmdline | tr -d ":") &
hostnamectl set-hostname rpi$(sed "s/^.*macaddr=\([0-9A-F:]*\).*$/\1/" /proc/cmdline | tr -d ":") &
echo rpi$(sed "s/^.*macaddr=\([0-9A-F:]*\).*$/\1/" /proc/cmdline | tr -d ":") > /etc/hostname &
echo 127.0.1.1		rpi$(sed "s/^.*macaddr=\([0-9A-F:]*\).*$/\1/" /proc/cmdline | tr -d ":") >> /etc/hosts &


systemctl disable apt-daily.service
systemctl stop apt-daily.service
