RaspberryPi-One-Wire icon indicating copy to clipboard operation
RaspberryPi-One-Wire copied to clipboard

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

Open EsunR opened this issue 3 years ago • 0 comments

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

会导致服务无法正常启动

EsunR avatar Feb 17 '22 16:02 EsunR