Just replace nemanjan00-laptop with your hostname, move /usr/bin/dhcpcd to /usr/bin/dhcpcd_old and move dhcpcd to /usr/bin/dhcpcd
Created
August 5, 2018 05:58
-
-
Save nemanjan00/bb0139bfc829ba4c2fe5be2610d31d64 to your computer and use it in GitHub Desktop.
Remove hostname for NetworkManager + dhcpcd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ARGS=() | |
for var in "$@"; do | |
# Ignore known bad arguments | |
[ "$var" != '-h' ] && [ "$var" != 'nemanjan00-laptop' ] && ARGS+=("$var") | |
done | |
echo "${ARGS[@]}" | |
/usr/bin/dhcpcd_old "${ARGS[@]}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment