Break the line into two lines:
NAMESERVER=$(echo $(awk '/^nameserver/ {print $2}' </etc/resolv.conf) | sed
's/ /,/g')
DNS=$(echo $NAMESERVER | sed 's/ /,/g')
OR reduce the line to a single execution sequence:
DNS=$(awk '/^nameserver/ {print $2}' </etc/resolv.conf | sed 's/
/,/g')
-----Original Message-----
From: o haya [mailto:ohaya@yahoo.com]
Sent: Friday, January 15, 2016 8:33 PM
To: cobbler(a)lists.fedorahosted.org
Subject: [cobbler] What is wrong with this (Cheetah) code?
Hi,
I'm not that familiar with Cheetah code, but I am getting this error in my .ks file:
Long-form placeholders - ${}, $(), $[], etc. are not valid inside expressions. Use them in
top-level $placeholders only.
Line 347, column 13
Line|Cheetah Code
----|-------------------------------------------------------------
344 | IP=$(ifconfig $IFACE | sed -n 's/.*inet addr:\([^ ]*\).*/\1/p')
345 | MASK=$(ifconfig $IFACE | sed -n 's/.*Mask:\([^ ]*\).*/\1/p')
346 | GATE=$(route -n | awk '/^0\.0\.0\.0/ {print $2}')
347 | DNS=$(echo $(awk '/^nameserver/ {print $2}' </etc/resolv.conf) | sed
's/ /,/g')
^
348 |else
349 | # pick up defaults from command line args
350 | IFACE=$(cmdline_val "ksdevice" "eth0")
Can someone tell me what is wrong with that line 347?
Thanks,
Jim
_______________________________________________
cobbler mailing list
cobbler(a)lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/cobbler@lists.fedorahosted.org