-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add eos image 4.24.6F #23
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: GomathiselviS <[email protected]>
Signed-off-by: GomathiselviS <[email protected]>
vars/eos/4.24.6M/vars.yml
Outdated
- sudo dhclient ma1 | ||
- | | ||
cat << EOF > /mnt/flash/dhcp-ma1-on-boot.sh | ||
#!/bin/bash | ||
|
||
dhclient ma1 | ||
ADDRESS=$(ifconfig ma1|grep inet|awk -F " " '{print $2}') | ||
NETMASK=$(ifconfig ma1|grep inet|awk -F " " '{print $4}') | ||
DEFAULT_GW=$(ip route|grep default|awk -F " " '{print $3}') | ||
FastCli -p 15 -c $a" | ||
configure terminal | ||
interface Management1 | ||
ip address $ADDRESS $NETMASK | ||
ip route 0.0.0.0 0.0.0.0 $DEFAULT_GW | ||
" | ||
EOF | ||
- exit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what needs to be fixed, and debugged to work properly.
vars/eos/4.24.6M/vars.yml
Outdated
ip address $(ifconfig ma1|grep inet|awk -F " " '{print $2}') $(ifconfig ma1|grep inet|awk -F " " '{print $4}') | ||
ip route 0.0.0.0 0.0.0.0 $(ip route|grep default|awk -F " " '{print $3}') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why did we replace the variables from above? We should move this logic to lines 26 to 28
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The variables are getting substituted properly, hence removed the variables. I will remove the variable declarations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if the variables are substituted properly, then why doesn't the commands work as expected?
It looks like you've just move the logic from lines above to here, which is a noop.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the typo. The variables are not getting substituted properly. After I used the value directly, instead of the variable, the commands are formed correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets do this, can you revert this change. Set
/bin/bash -ex
Then paste the output of the script. I cannot see why the variables wouldn't work properly
No description provided.