خرید بک لینک

Vote count: 0


I have never used C and I'm not writing this for security reasons, i am just writing this script to test an update via nsupdate to my BIND for a specific zone being "zoneA.unix". But i am receiving "option: undefined variable"
And I'm not to sure if this is the correct way to do nsupdate via a user's inputs.

echo "First of all we need to grab your useame:"
set uname = $<
 if ($uname == "zoneA")then
 echo "password: "
 set passwd = $<
    if ($passwd == "Azone")then
            echo "you are in"
            echo "now to do the nsupdate"
            echo "do you wish to (A)dd or (D)elete a record"
            set numeric = $<
                    if ($numeric == "A")then
                    $option = "add"
                    $testinga = "add"
                    else if($numeric == "D")then
                    $option = "delete"
                    $testinga = "delete"
                    endif
            echo "what to $testinga to the zone zoneA.unix?"
            set ierzonename = $<
            nsupdate -k /usr/local/etc/namedb/Keys/Kzonea.+157+57916.key -v
            debug yes
            zone zonea.unix
            update $testinga $ierzonename 86400 A 127.0.0.1
            show
            echo "is this correct (Y)es (n)"
            set sendoff = $<
  if($sendoff == "Y")then
  send
  else if ($sendoff == "N")then
  quit
  endif

So the code works fine til the $option part and I'm not to sure if it will work after the input needed during the nsupdate because it won't pause it, well i don't know how i can pause it.

asked 3 mins ago

برچسب: نویسنده: استخدام کار تاريخ: يکشنبه 2 خرداد 1395 ساعت: 18:23

صفحه بندی