TANG617 / RaspberryPi-One-Wire

Use a sigle USB-C cable to transfer data between RaspberryPi 4B and iPad
MIT License
55 stars 4 forks source link

脚本自动写入的文件有问题 #2

Open EsunR opened 2 years ago

EsunR commented 2 years ago
echo -e "interface=usb0\ndhcp-range=10.55.0.2,10.55.0.6,255.255.255.248,1h\ndhcp-option=3\nleasefile-ro" >> /etc/dnsmasq.d/usb
echo -e "auto usb0\nallow-hotplug usb0\niface usb0 inet static\n  address 10.55.0.1\n  netmask 255.255.255.248">> /etc/network/interfaces.d/usb0
# ... ...
echo -e "#!/bin/bash\n/root/usb.sh\nexit 0" > /etc/rc.local 

经测试这三行指令的 echo -e 会把 -e 写入到文件中,如:

-e interface=usb0
dhcp-range=10.55.0.2,10.55.0.6,255.255.255.248,1h
dhcp-option=3
leasefile-ro

会导致服务无法正常启动