mirror of
https://github.com/brain-hackers/brain-config.git
synced 2024-12-22 20:20:06 +09:00
Handle 73-usb-net-by-mac.link when toggling network names
This commit is contained in:
parent
64d5c2c25d
commit
a558510918
7
debian/changelog
vendored
7
debian/changelog
vendored
@ -1,3 +1,10 @@
|
|||||||
|
raspi-config (20210922) bullseye; urgency=medium
|
||||||
|
|
||||||
|
* Handle 73-usb-net-by-mac.link when toggling network names
|
||||||
|
- https://github.com/RPi-Distro/raspi-config/issues/166
|
||||||
|
|
||||||
|
-- Serge Schneider <serge@raspberrypi.com> Wed, 22 Sep 2021 16:13:52 +0100
|
||||||
|
|
||||||
raspi-config (20210827) bullseye; urgency=medium
|
raspi-config (20210827) bullseye; urgency=medium
|
||||||
|
|
||||||
* Add switching for new camera detection in firmware
|
* Add switching for new camera detection in firmware
|
||||||
|
@ -1880,7 +1880,9 @@ EOF
|
|||||||
}
|
}
|
||||||
|
|
||||||
get_net_names() {
|
get_net_names() {
|
||||||
if grep -q "net.ifnames=0" $CMDLINE || [ "$(readlink -f /etc/systemd/network/99-default.link)" = "/dev/null" ] ; then
|
if grep -q "net.ifnames=0" $CMDLINE || \
|
||||||
|
( [ "$(readlink -f /etc/systemd/network/99-default.link)" = "/dev/null" ] && \
|
||||||
|
[ "$(readlink -f /etc/systemd/network/73-usb-net-by-mac.link)" = "/dev/null" ] ); then
|
||||||
echo 1
|
echo 1
|
||||||
else
|
else
|
||||||
echo 0
|
echo 0
|
||||||
@ -1906,9 +1908,11 @@ do_net_names () {
|
|||||||
if [ $RET -eq 0 ]; then
|
if [ $RET -eq 0 ]; then
|
||||||
sed -i $CMDLINE -e "s/net.ifnames=0 *//"
|
sed -i $CMDLINE -e "s/net.ifnames=0 *//"
|
||||||
rm -f /etc/systemd/network/99-default.link
|
rm -f /etc/systemd/network/99-default.link
|
||||||
|
rm -f /etc/systemd/network/73-usb-net-by-mac.link
|
||||||
STATUS=enabled
|
STATUS=enabled
|
||||||
elif [ $RET -eq 1 ]; then
|
elif [ $RET -eq 1 ]; then
|
||||||
ln -sf /dev/null /etc/systemd/network/99-default.link
|
ln -sf /dev/null /etc/systemd/network/99-default.link
|
||||||
|
ln -sf /dev/null /etc/systemd/network/73-usb-net-by-mac.link
|
||||||
STATUS=disabled
|
STATUS=disabled
|
||||||
else
|
else
|
||||||
return $RET
|
return $RET
|
||||||
|
Loading…
Reference in New Issue
Block a user