Subscribe

WFA to modify /etc/rc files

Hello,

 

We are using WFA to create vFilers. It does roughly everything we need. However, it does update /etc/rc files (which is very good) but we'd like to have it updated a bit differently.

 

It adds the following lines into /etc/rc:

vlan add vif0 XXXX

vlan add vif0 XXXX

vlan add vif0 XXXX

ifconfig vif0-XXXX `hostname`-vifX-XXX netmask 255.255.255.224 broadcast xx.xxx.xxx.xx partner vif0-XXXX up

ifconfig vif0-XXXX `hostname`-vifX-XXX netmask 255.255.255.224 broadcast xx.xxx.xxx.xx partner vif0-XXXX up

ifconfig vif0-XXXX `hostname`-vifX-XXX netmask 255.255.255.224 broadcast xx.xxx.xxx.xx partner vif0-XXXX up

 

Can WFA update it in a way like this?

# vFiler 01

vlan add vif0 XXXX

ifconfig vif0-XXXX `hostname`-vifX-XXX netmask 255.255.255.224 broadcast xx.xxx.xxx.xx partner vif0-XXXX up

 

# vFiler 02

vlan add vif0 XXXX

ifconfig vif0-XXXX `hostname`-vifX-XXX netmask 255.255.255.224 broadcast xx.xxx.xxx.xx partner vif0-XXXX up

 

# vFiler 03

vlan add vif0 XXXX

ifconfig vif0-XXXX `hostname`-vifX-XXX netmask 255.255.255.224 broadcast xx.xxx.xxx.xx partner vif0-XXXX up

 

Even the comments are important.

 

Have you had a need for this, or could you please point me the right direction?

 

Thank you!

Lukas

Re: WFA to modify /etc/rc files

Hi Lukas,

 

@ Can WFA update it in a way like this?

----

Its not WFA that writes this data in /etc/rc files and hence can't control it. Its the ONTAP that does it and WFA has no say in it.

 

You can write a Data-Formatter code which can modify /etc/rc in the format you want after actual commands execution is complete. For your simplistic requirement, it should not be very difficult. This code can also be a WFA command.

 

sinhaa

 

 

 

 

 

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

Re: WFA to modify /etc/rc files

[ Edited ]

Hi,

 

thanks for your answer.

 

Could you give me some hints? Should I write a data-formatter which then will be used by WFA? Or can I even use WFA only?

 

Thanks for giving me direction. I will try to look into it.

 

Regards,

Lukas