Actions
Support #26430
closedSafemode doesn't allow to access 'host_subnet' on #<Safemode::ScopeObject>
Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Unattended installations
Target version:
-
Triaged:
No
Fixed in Releases:
Found in Releases:
Description
Hi I'm trying to create a finish template that statically adds ip in the interfaces file rathar than dhcp.
But when I preview the below I get
Safemode doesn't allow to access 'host_subnet' on #<Safemode::ScopeObject>
real=`ip -o link | awk '/<%= @host.mac -%>/ {print $2;}' | sed s/://` cat << EOF > /etc/network/interfaces #loopback auto lo iface lo inet loopback auto $real allow-hotplug $real iface $real inet static address <%= @host.ip %> dns-search <%= @host.domain %> gateway <%= host_subnet.gateway %> netmask <%= host_subnet.mask %> dns-nameservers <%= host_subnet.dns_primary %> <%= host_subnet.dns_secondary %> EOF
what should I change to get the subnet gateway/netmast?
Thanks
Updated by Lukas Zapletal about 5 years ago
- Status changed from New to Closed
Hello, host_subnet
seems to be undefined variable. Do you want to use \@host.subnet
instead?
@host.subnet.xxxx
Please use our community forum for questions.
Actions