Skip to content

Instantly share code, notes, and snippets.

@StayPirate
Last active December 9, 2019 10:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save StayPirate/08961123f1fa6374bdd61fec30bf6757 to your computer and use it in GitHub Desktop.
Save StayPirate/08961123f1fa6374bdd61fec30bf6757 to your computer and use it in GitHub Desktop.
Enable this unit to automatically change the macadd at boot. Macadd is hardcoded.
[Unit]
Description=MAC Address Change %I
Wants=network-pre.target
Before=network-pre.target
BindsTo=sys-subsystem-net-devices-%i.device
After=sys-subsystem-net-devices-%i.device
[Service]
Type=oneshot
ExecStart=/usr/bin/ip link set dev %i address 54:e1:ad:9b:71:e4
ExecStart=/usr/bin/ip link set dev %i up
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment