2024-02-15 22:07:30 +01:00
|
|
|
ip=`cat /link/config/net.json | grep -o '"ip":[0-9|.|"| ]*' | awk -F\" '{print $4}'`
|
|
|
|
echo $ip > /etc/hostname
|
|
|
|
hostname -F /etc/hostname
|
|
|
|
if [ -f "/link/config/mac" ]; then
|
|
|
|
sed -i "s/host-name=.*/host-name=`cat /link/config/mac`/g" /etc/avahi/avahi-daemon.conf
|
|
|
|
else
|
|
|
|
sed -i "s/host-name=.*/host-name=test/g" /etc/avahi/avahi-daemon.conf
|
|
|
|
fi
|
2024-02-15 22:07:35 +01:00
|
|
|
|
|
|
|
if [ -f /usr/local/var/run/dbus/pid ] ;then
|
2024-02-15 22:07:30 +01:00
|
|
|
rm /usr/local/var/run/dbus/pid
|
2024-02-15 22:07:35 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -f /run/avahi-daemon/pid ] ;then
|
2024-02-15 22:07:30 +01:00
|
|
|
rm /run/avahi-daemon/pid
|
2024-02-15 22:07:35 +01:00
|
|
|
fi
|
|
|
|
|
2024-02-15 22:07:30 +01:00
|
|
|
/link/bin/dbus-daemon --config-file=/etc/dbus-1/system.conf
|
|
|
|
/link/bin/avahi-daemon -f /etc/avahi/avahi-daemon.conf -D
|