编辑 ubiquity /temp/system.cfg 文件
Editting ubiquity /temp/system.cfg file
我想通过 SSH 将频率扫描列表添加到无处不在的设备。
这是我正在使用的代码:
grep -v "wireless.1.scan_list" /tmp/system.cfg > /tmp/tempconfig
echo "wireless.1.scan_list.channels=5150,5155,5160,5165,5170,5175,5180,5185,5190,5195,5200,5205,5210,5215,5220,5225,5230,5235,5240,5245,5250,5255,5260,5265,5270,5275,5280,5285,5290,5295,5300,5305,5310,5315,5320,5325,5330,5335,5340,5345,5350,5355,5360,5365,5370,5375,5380,5385,5390,5395,5400,5405,5410,5415,5420,5425,5430,5435,5440,5445,5450,5455,5460,5465,5470,5475,5480,5485,5490,5495,5500,5505,5510,5515,5520,5525,5530,5535,5540,5545,5550,5555,5560,5565,5570,5575,5580,5585,5590,5595,5600,5605,5610,5615,5620,5625,5630,5635,5640,5645,5650,5655,5660,5665,5670,5675,5680,5685,5690,5695,5700,5705,5710,5715,5720,5725,5730,5735,5740,5745,5750,5755,5760,5765,5770,5775,5780,5785,5790,5795,5800,5805,5810,5815,5820,5825,5830,5835,5840,5845,5850,5855,5860,5865,5870,5875" >> /tmp/tempconfig
echo "wireless.1.scan_list.status=enabled" >> /tmp/tempconfig
mv /tmp/tempconfig /tmp/system.cfg
save
/usr/etc/rc.d/rc.softrestart save
唯一的问题是,当我粘贴它时,"echo "wireless.1.scan_list.channels" 命令不完整(很可能是由于设备上的字符数阈值)。然后我试图打破命令分为两部分。在 CMD 端成功了,但是当我通过 http 登录到设备时,我只看到了第二批数字。
我要更新大约 6000 台设备,因此我无法通过浏览器手动执行此操作。请指教...
直接换行:
grep -v "wireless.1.scan_list" /tmp/system.cfg > /tmp/tempconfig
printf "wireless.1.scan_list.channels=5150,5155,5160,5165,5170,5175,5180,5185,5190," > /tmp/tempconfig
printf "5195,5200,5205,5210,5215,5220,5225,5230,5235,5240,5245,5250,5255,5260,5265," >> /tmp/tempconfig
printf "5270,5275,5280,5285,5290,5295,5300,5305,5310,5315,5320,5325,5330,5335,5340," >> /tmp/tempconfig
printf "5345,5350,5355,5360,5365,5370,5375,5380,5385,5390,5395,5400,5405,5410,5415," >> /tmp/tempconfig
printf "5420,5425,5430,5435,5440,5445,5450,5455,5460,5465,5470,5475,5480,5485,5490," >> /tmp/tempconfig
printf "5495,5500,5505,5510,5515,5520,5525,5530,5535,5540,5545,5550,5555,5560,5565," >> /tmp/tempconfig
printf "5570,5575,5580,5585,5590,5595,5600,5605,5610,5615,5620,5625,5630,5635,5640," >> /tmp/tempconfig
printf "5645,5650,5655,5660,5665,5670,5675,5680,5685,5690,5695,5700,5705,5710,5715," >> /tmp/tempconfig
printf "5720,5725,5730,5735,5740,5745,5750,5755,5760,5765,5770,5775,5780,5785,5790," >> /tmp/tempconfig
printf "5795,5800,5805,5810,5815,5820,5825,5830,5835,5840,5845,5850,5855,5860,5865," >> /tmp/tempconfig
printf "5870,5875\n" >> /tmp/tempconfig
echo "wireless.1.scan_list.status=enabled" >> /tmp/tempconfig
mv /tmp/tempconfig /tmp/system.cfg
save
/usr/etc/rc.d/rc.softrestart save
我想通过 SSH 将频率扫描列表添加到无处不在的设备。 这是我正在使用的代码:
grep -v "wireless.1.scan_list" /tmp/system.cfg > /tmp/tempconfig
echo "wireless.1.scan_list.channels=5150,5155,5160,5165,5170,5175,5180,5185,5190,5195,5200,5205,5210,5215,5220,5225,5230,5235,5240,5245,5250,5255,5260,5265,5270,5275,5280,5285,5290,5295,5300,5305,5310,5315,5320,5325,5330,5335,5340,5345,5350,5355,5360,5365,5370,5375,5380,5385,5390,5395,5400,5405,5410,5415,5420,5425,5430,5435,5440,5445,5450,5455,5460,5465,5470,5475,5480,5485,5490,5495,5500,5505,5510,5515,5520,5525,5530,5535,5540,5545,5550,5555,5560,5565,5570,5575,5580,5585,5590,5595,5600,5605,5610,5615,5620,5625,5630,5635,5640,5645,5650,5655,5660,5665,5670,5675,5680,5685,5690,5695,5700,5705,5710,5715,5720,5725,5730,5735,5740,5745,5750,5755,5760,5765,5770,5775,5780,5785,5790,5795,5800,5805,5810,5815,5820,5825,5830,5835,5840,5845,5850,5855,5860,5865,5870,5875" >> /tmp/tempconfig
echo "wireless.1.scan_list.status=enabled" >> /tmp/tempconfig
mv /tmp/tempconfig /tmp/system.cfg
save
/usr/etc/rc.d/rc.softrestart save
唯一的问题是,当我粘贴它时,"echo "wireless.1.scan_list.channels" 命令不完整(很可能是由于设备上的字符数阈值)。然后我试图打破命令分为两部分。在 CMD 端成功了,但是当我通过 http 登录到设备时,我只看到了第二批数字。
我要更新大约 6000 台设备,因此我无法通过浏览器手动执行此操作。请指教...
直接换行:
grep -v "wireless.1.scan_list" /tmp/system.cfg > /tmp/tempconfig
printf "wireless.1.scan_list.channels=5150,5155,5160,5165,5170,5175,5180,5185,5190," > /tmp/tempconfig
printf "5195,5200,5205,5210,5215,5220,5225,5230,5235,5240,5245,5250,5255,5260,5265," >> /tmp/tempconfig
printf "5270,5275,5280,5285,5290,5295,5300,5305,5310,5315,5320,5325,5330,5335,5340," >> /tmp/tempconfig
printf "5345,5350,5355,5360,5365,5370,5375,5380,5385,5390,5395,5400,5405,5410,5415," >> /tmp/tempconfig
printf "5420,5425,5430,5435,5440,5445,5450,5455,5460,5465,5470,5475,5480,5485,5490," >> /tmp/tempconfig
printf "5495,5500,5505,5510,5515,5520,5525,5530,5535,5540,5545,5550,5555,5560,5565," >> /tmp/tempconfig
printf "5570,5575,5580,5585,5590,5595,5600,5605,5610,5615,5620,5625,5630,5635,5640," >> /tmp/tempconfig
printf "5645,5650,5655,5660,5665,5670,5675,5680,5685,5690,5695,5700,5705,5710,5715," >> /tmp/tempconfig
printf "5720,5725,5730,5735,5740,5745,5750,5755,5760,5765,5770,5775,5780,5785,5790," >> /tmp/tempconfig
printf "5795,5800,5805,5810,5815,5820,5825,5830,5835,5840,5845,5850,5855,5860,5865," >> /tmp/tempconfig
printf "5870,5875\n" >> /tmp/tempconfig
echo "wireless.1.scan_list.status=enabled" >> /tmp/tempconfig
mv /tmp/tempconfig /tmp/system.cfg
save
/usr/etc/rc.d/rc.softrestart save