瀏覽代碼

Set the avahi hostname when making an image

Bob Mottram 9 年之前
父節點
當前提交
0dfa5a608f
共有 1 個檔案被更改,包括 2 行新增0 行删除
  1. 2
    0
      src/freedombone-image-customise

+ 2
- 0
src/freedombone-image-customise 查看文件

@@ -343,6 +343,8 @@ chroot "$rootdir" apt-get install -y avahi-daemon avahi-utils avahi-discover ava
343 343
 chroot "$rootdir" apt-get install -y iptables dnsutils net-tools network-manager iputils-ping
344 344
 chroot "$rootdir" apt-get install -y libnss-mdns libnss-myhostname libnss-gw-name nano man ntp
345 345
 
346
+sed -i "s|#host-name=.*|host-name=${PROJECT_NAME}|g" $rootdir/etc/avahi/avahi-daemon.conf
347
+
346 348
 chroot "$rootdir" /bin/bash -x <<EOF
347 349
 git clone https://github.com/bashrc/freedombone /root/freedombone
348 350
 cd /root/freedombone