I'm using Flack to load and run a script within every VMs. However, one piece of the code running awk in this script was not triggered. I have tried different ways, like giving sudo privilege when fill up the execute service in Flack, providing absolute paths for awk, files and folders appeared in the shell scripts, but got no luck.
I paste my shell script below, any suggestion is appreciated.
---------------------------------------------------
cd /tmp/xorp_autostart/
HOME=`pwd`
vm_info_file="vm_info.txt"
hostname=echo hostname
echo $hostname
# get hostname
sudo hostname > $HOME/$vm_info_file
# get interface information
sudo /sbin/ifconfig | egrep 'eth|inet addr' >> $HOME/$vm_info_file
# get timestamp
timestamp=$(date +"%Y-%m-%d %r")
echo $timestamp
xorp_conf_dir=/etc/xorp
if [ -d $xorp_conf_dir ]
then
echo "XORP dir exist"
else
sudo mkdir $xorp_conf_dir
fi
sudo awk -f $HOME/ospfd-conf-gen.awk $HOME/$vm_info_file "$timestamp" 24 > $HOME/ospfd.conf
sudo cp $HOME/ospfd.conf $xorp_conf_dir/.
# check if xorp has been added to the group
xorp_group=`sudo cat /etc/group | grep "xorp"`
if [ "$xorp_group" = "" ]
then
echo "Add xorp to group"
sudo groupadd xorp
else
echo "xorp is already added to the group"
fi
# first stop current xorp process if it's running
xorp_pids=`ps -ef | grep xorp_ | awk '{ if ( $1 == "root" ) {print $2}}'`
if [ "$xorp_pids" = "" ]
then
echo "xorp is not running at this time"
else
echo "xorp is running, stop it first"
ps -ef | grep xorp_ | awk '{ if ( $1 == "root" ) {print "sudo kill -9 " $2}}' | sh
fi
# start xorp
cd /usr/local/xorp/sbin/
echo "XORP is starting ......"
sudo ./xorp_rtrmgr -b $xorp_conf_dir/ospfd.conf -l /tmp/xorp_rtrmgr_log -d
--------------------------------------------------------
In Flack,
I used the command /bin/bash /tmp/xorp_autostart/start-xorp.sh and sudo /bin/bash /tmp/xorp_autostart/start-xorp.sh, but neither worked for me.
It seemed like the command: "sudo hostname > $HOME/$vm_info_file" and "sudo /sbin/ifconfig | egrep 'eth|inet addr' >> $HOME/$vm_info_file" were not executed.
Thank you,
Xuan Liu
It seemed like the command: "sudo hostname > $HOME/$vm_info_file" and "sudo /sbin/ifconfig | egrep 'eth|inet addr' >> $HOME/$vm_info_file" were not executed.
--
GENI Users is a community supported mailing list, so please help by responding to questions you know the answer to.
If this is your first time posting a question to this list, please review http://groups.geni.net/geni/wiki/GENIExperimenter/CommunityMailingList
---
You received this message because you are subscribed to a topic in the Google Groups "GENI Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/geni-users/7MPKxQ0FYco/unsubscribe.
To unsubscribe from this group and all its topics, send an email to geni-users+...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to geni-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
GENI Users is a community supported mailing list, so please help by responding to questions you know the answer to.
If this is your first time posting a question to this list, please review http://groups.geni.net/geni/wiki/GENIExperimenter/CommunityMailingList
--- You received this message because you are subscribed to a topic in the Google Groups "GENI Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/geni-users/7MPKxQ0FYco/unsubscribe.
To unsubscribe from this group and all its topics, send an email to geni-users+unsubscribe@googlegroups.com.
email to geni-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
GENI Users is a community supported mailing list, so please help by responding to
questions you know the answer to.
If this is your first time posting a question to this list, please review
http://groups.geni.net/geni/wiki/GENIExperimenter/CommunityMailingList
--- You received this message because you are subscribed to a topic in the Google Groups
"GENI Users" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/geni-users/7MPKxQ0FYco/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
For more options, visit https://groups.google.com/d/optout.
--
GENI Users is a community supported mailing list, so please help by responding to questions you know
the answer to.
If this is your first time posting a question to this list, please review
http://groups.geni.net/geni/wiki/GENIExperimenter/CommunityMailingList
---
You received this message because you are subscribed to the Google Groups "GENI Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
For more options, visit https://groups.google.com/d/optout.
--
GENI Users is a community supported mailing list, so please help by responding to questions you know the answer to.
If this is your first time posting a question to this list, please review http://groups.geni.net/geni/wiki/GENIExperimenter/CommunityMailingList
--- You received this message because you are subscribed to a topic in the Google Groups "GENI Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/geni-users/7MPKxQ0FYco/unsubscribe.
To unsubscribe from this group and all its topics, send an email to geni-users+unsubscribe@googlegroups.com.
email to geni-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
GENI Users is a community supported mailing list, so please help by
responding to
questions you know the answer to.
If this is your first time posting a question to this list, please review
http://groups.geni.net/geni/wiki/GENIExperimenter/CommunityMailingList
--- You received this message because you are subscribed to a topic in the
Google Groups
"GENI Users" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/geni-users/7MPKxQ0FYco/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
For more options, visit https://groups.google.com/d/optout.
--
GENI Users is a community supported mailing list, so please help by responding to
questions you know
the answer to.
If this is your first time posting a question to this list, please review
http://groups.geni.net/geni/wiki/GENIExperimenter/CommunityMailingList
---
You received this message because you are subscribed to the Google Groups "GENI
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
For more options, visit https://groups.google.com/d/optout.
--
GENI Users is a community supported mailing list, so please help by responding to questions you
know the answer to.
If this is your first time posting a question to this list, please review
http://groups.geni.net/geni/wiki/GENIExperimenter/CommunityMailingList
--- You received this message because you are subscribed to a topic in the Google Groups "GENI
Users" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/geni-users/7MPKxQ0FYco/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
For more options, visit https://groups.google.com/d/optout.
--
GENI Users is a community supported mailing list, so please help by responding to questions you know
the answer to.
If this is your first time posting a question to this list, please review
http://groups.geni.net/geni/wiki/GENIExperimenter/CommunityMailingList
---
You received this message because you are subscribed to the Google Groups "GENI Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
--
GENI Users is a community supported mailing list, so please help by responding to questions you know the answer to.
If this is your first time posting a question to this list, please review http://groups.geni.net/geni/wiki/GENIExperimenter/CommunityMailingList
--- You received this message because you are subscribed to a topic in the Google Groups "GENI Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/geni-users/7MPKxQ0FYco/unsubscribe.
To unsubscribe from this group and all its topics, send an email to geni-users+unsubscribe@googlegroups.com.
email to geni-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
GENI Users is a community supported mailing list, so please help by
responding to
questions you know the answer to.
If this is your first time posting a question to this list, please review
http://groups.geni.net/geni/wiki/GENIExperimenter/CommunityMailingList
--- You received this message because you are subscribed to a topic in the
Google Groups
"GENI Users" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/geni-users/7MPKxQ0FYco/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
For more options, visit https://groups.google.com/d/optout.
--
GENI Users is a community supported mailing list, so please help by responding to
questions you know
the answer to.
If this is your first time posting a question to this list, please review
http://groups.geni.net/geni/wiki/GENIExperimenter/CommunityMailingList
---
You received this message because you are subscribed to the Google Groups "GENI
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
For more options, visit https://groups.google.com/d/optout.
--
GENI Users is a community supported mailing list, so please help by responding to questions you
know the answer to.
If this is your first time posting a question to this list, please review
http://groups.geni.net/geni/wiki/GENIExperimenter/CommunityMailingList
--- You received this message because you are subscribed to a topic in the Google Groups "GENI
Users" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/geni-users/7MPKxQ0FYco/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
For more options, visit https://groups.google.com/d/optout.
--
GENI Users is a community supported mailing list, so please help by responding to questions you know
the answer to.
If this is your first time posting a question to this list, please review
http://groups.geni.net/geni/wiki/GENIExperimenter/CommunityMailingList
---
You received this message because you are subscribed to the Google Groups "GENI Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
--
GENI Users is a community supported mailing list, so please help by responding to questions you know the answer to.
If this is your first time posting a question to this list, please review http://groups.geni.net/geni/wiki/GENIExperimenter/CommunityMailingList
--- You received this message because you are subscribed to a topic in the Google Groups "GENI Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/geni-users/7MPKxQ0FYco/unsubscribe.
To unsubscribe from this group and all its topics, send an email to geni-users+unsubscribe@googlegroups.com.
email to geni-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
GENI Users is a community supported mailing list, so please help by
responding to
questions you know the answer to.
If this is your first time posting a question to this list, please
review
http://groups.geni.net/geni/wiki/GENIExperimenter/CommunityMailingList
--- You received this message because you are subscribed to a topic in
the
Google Groups
"GENI Users" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/geni-users/7MPKxQ0FYco/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
For more options, visit https://groups.google.com/d/optout.
--
GENI Users is a community supported mailing list, so please help by
responding to
questions you know
the answer to.
If this is your first time posting a question to this list, please review
http://groups.geni.net/geni/wiki/GENIExperimenter/CommunityMailingList
---
You received this message because you are subscribed to the Google Groups
"GENI
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to
For more options, visit https://groups.google.com/d/optout.
--
GENI Users is a community supported mailing list, so please help by responding to
questions you
know the answer to.
If this is your first time posting a question to this list, please review
http://groups.geni.net/geni/wiki/GENIExperimenter/CommunityMailingList
--- You received this message because you are subscribed to a topic in the Google
Groups "GENI
Users" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/geni-users/7MPKxQ0FYco/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
For more options, visit https://groups.google.com/d/optout.
--
GENI Users is a community supported mailing list, so please help by responding to
questions you know
the answer to.
If this is your first time posting a question to this list, please review
http://groups.geni.net/geni/wiki/GENIExperimenter/CommunityMailingList
---
You received this message because you are subscribed to the Google Groups "GENI
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
For more options, visit https://groups.google.com/d/optout.
--
GENI Users is a community supported mailing list, so please help by responding to questions you
know the answer to.
If this is your first time posting a question to this list, please review
http://groups.geni.net/geni/wiki/GENIExperimenter/CommunityMailingList
--- You received this message because you are subscribed to a topic in the Google Groups "GENI
Users" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/geni-users/7MPKxQ0FYco/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
For more options, visit https://groups.google.com/d/optout.
--
GENI Users is a community supported mailing list, so please help by responding to questions you know
the answer to.
If this is your first time posting a question to this list, please review
http://groups.geni.net/geni/wiki/GENIExperimenter/CommunityMailingList
---
You received this message because you are subscribed to the Google Groups "GENI Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
For more options, visit https://groups.google.com/d/optout.
--
GENI Users is a community supported mailing list, so please help by responding to questions you know the answer to.
If this is your first time posting a question to this list, please review http://groups.geni.net/geni/wiki/GENIExperimenter/CommunityMailingList
--- You received this message because you are subscribed to a topic in the Google Groups "GENI Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/geni-users/7MPKxQ0FYco/unsubscribe.
To unsubscribe from this group and all its topics, send an email to geni-users+unsubscribe@googlegroups.com.