Loading ...
Sorry, an error occurred while loading the content.

Re: [PBML] Re: Doubts about system or exec!

Expand Messages
  • Marcos Onisto
    Hi Rob, When i use the print, i see that everything is good. My problem is when i use the system or exec. When i execute this command manualy on the shell, i
    Message 1 of 7 , Oct 2, 2006
    • 0 Attachment
      Hi Rob,

      When i use the print, i see that everything is good. My problem is when i use the system or exec. When i execute this command manualy on the shell, i didn´t get this error and i got the result that i need.

      Thanks a lot,

      MLO


      Rob Biedenharn <Rob@...> wrote: Change the "system" to "print" and see if the command is something
      that you could run manually in the shell.

      -Rob

      On Sep 29, 2006, at 11:52 PM, Marcos Onisto wrote:

      > My variables are ok, i already checked.
      >
      > Thanks a lot.
      >
      > MLO
      >
      > Damien Carbery <daymobrew@...>
      > wrote: --- In perl-
      > beginner@yahoogroups.com, Marcos Onisto <mlonisto@...> wrote:
      >>
      >> Hello All,
      >>
      >> I'm preparing a script for administration of my MRTG, so when i
      > execute the mrtg command on the shell, i dont get errors, but when i
      > execute the same command in my script, i get the errors below.
      >>
      >> my script:
      >> system("/opt/mrtg/bin/mrtg $meudir/$answer0.cfg");
      >>
      >> Exec give the same error.
      >>
      >> Use of uninitialized value at
      > /opt/mrtg2/bin/../lib/mrtg2/MRTG_lib.pm line 511.
      >> ERROR: "WorkDir" not specified in mrtg config file
      >>
      >> I dont understand this error, take a look:
      >> bash-2.03# more /opt/mrtg/clientes/blueone/blueone.cfg
      >> EnableIPv6: no
      >> WorkDir: /opt/mrtg/clientes/blueone
      >>
      >> Can somebody help me? I appreciate some help.
      >
      > One of your two variables, $meudir and $answer0, has not been given a
      > value. Check your script.
      >
      >
      >
      >
      >
      >
      > ---------------------------------
      > Get your email and more, right on the new Yahoo.com
      >
      > [Non-text portions of this message have been removed]
      >
      >
      >
      > Unsubscribing info is here: http://help.yahoo.com/help/us/groups/
      > groups-32.html
      > Yahoo! Groups Links
      >
      >
      >
      >
      >
      >
      >
      >
      >
      >






      ---------------------------------
      Stay in the know. Pulse on the new Yahoo.com. Check it out.

      [Non-text portions of this message have been removed]
    • Rob Biedenharn
      Marcos, It s hard to say what s happening on your system with so little to go on, but I d suspect that there s a difference in how the command mrtg behaves
      Message 2 of 7 , Oct 2, 2006
      • 0 Attachment
        Marcos,

        It's hard to say what's happening on your system with so little to go
        on, but I'd suspect that there's a difference in how the command mrtg
        behaves based on the type of the controlling terminal or standard
        input/output or there's something different in the environment.

        Even a command as common as `ls` has dependencies like this. Compare
        `ls` and `ls | cat` on most systems. Perhaps your 'mrtg` command
        does something similar.

        This really isn't a perl question -- it's asking about something in
        your execution environment and you just happen to be using perl when
        noticing the effect.

        -Rob


        Rob Biedenharn http://agileconsultingllc.com
        Rob@...

        On Oct 2, 2006, at 7:45 AM, Marcos Onisto wrote:

        > Hi Rob,
        >
        > When i use the print, i see that everything is good. My problem is
        > when i use the system or exec. When i execute this command manually
        > on the shell, i didn´t get this error and i got the result that i
        > need.
        >
        > Thanks a lot,
        >
        > MLO
        >
        >
        > Rob Biedenharn <Rob@...> wrote:
        > Change the "system" to "print" and see if the command is something
        > that you could run manually in the shell.
        >
        > -Rob
        >
        > On Sep 29, 2006, at 11:52 PM, Marcos Onisto wrote:
        >
        >> My variables are ok, i already checked.
        >>
        >> Thanks a lot.
        >>
        >> MLO
        >>
        >> Damien Carbery <daymobrew@...>
        >> wrote: --- In perl-
        >> beginner@yahoogroups.com, Marcos Onisto <mlonisto@...> wrote:
        >>>
        >>> Hello All,
        >>>
        >>> I'm preparing a script for administration of my MRTG, so when i
        >> execute the mrtg command on the shell, i dont get errors, but when i
        >> execute the same command in my script, i get the errors below.
        >>>
        >>> my script:
        >>> system("/opt/mrtg/bin/mrtg $meudir/$answer0.cfg");
        >>>
        >>> Exec give the same error.
        >>>
        >>> Use of uninitialized value at
        >> /opt/mrtg2/bin/../lib/mrtg2/MRTG_lib.pm line 511.
        >>> ERROR: "WorkDir" not specified in mrtg config file
        >>>
        >>> I dont understand this error, take a look:
        >>> bash-2.03# more /opt/mrtg/clientes/blueone/blueone.cfg
        >>> EnableIPv6: no
        >>> WorkDir: /opt/mrtg/clientes/blueone
        >>>
        >>> Can somebody help me? I appreciate some help.
        >>
        >> One of your two variables, $meudir and $answer0, has not been
        >> given a
        >> value. Check your script.
      • Marcos Onisto
        Hello All, I solved my problem, i was using the version Perl 5.005_03 default of Solaris 8, after that i was upgrade for perl-5.8.7-sol8-sparc-local.gz of
        Message 3 of 7 , Oct 2, 2006
        • 0 Attachment
          Hello All,

          I solved my problem, i was using the version 'Perl 5.005_03' default of Solaris 8, after that i was upgrade for perl-5.8.7-sol8-sparc-local.gz of sunfreeware.com (Solaris 8), the problem didn´t continue.

          Thanks a lot,

          regards,

          Marcos Luiz Onisto


          Rob Biedenharn <Rob@...> wrote: Marcos,

          It's hard to say what's happening on your system with so little to go
          on, but I'd suspect that there's a difference in how the command mrtg
          behaves based on the type of the controlling terminal or standard
          input/output or there's something different in the environment.

          Even a command as common as `ls` has dependencies like this. Compare
          `ls` and `ls | cat` on most systems. Perhaps your 'mrtg` command
          does something similar.

          This really isn't a perl question -- it's asking about something in
          your execution environment and you just happen to be using perl when
          noticing the effect.

          -Rob

          Rob Biedenharn http://agileconsultingllc.com
          Rob@...

          On Oct 2, 2006, at 7:45 AM, Marcos Onisto wrote:

          > Hi Rob,
          >
          > When i use the print, i see that everything is good. My problem is
          > when i use the system or exec. When i execute this command manually
          > on the shell, i didn´t get this error and i got the result that i
          > need.
          >
          > Thanks a lot,
          >
          > MLO
          >
          >
          > Rob Biedenharn <Rob@...> wrote:
          > Change the "system" to "print" and see if the command is something
          > that you could run manually in the shell.
          >
          > -Rob
          >
          > On Sep 29, 2006, at 11:52 PM, Marcos Onisto wrote:
          >
          >> My variables are ok, i already checked.
          >>
          >> Thanks a lot.
          >>
          >> MLO
          >>
          >> Damien Carbery <daymobrew@...>
          >> wrote: --- In perl-
          >> beginner@yahoogroups.com, Marcos Onisto <mlonisto@...> wrote:
          >>>
          >>> Hello All,
          >>>
          >>> I'm preparing a script for administration of my MRTG, so when i
          >> execute the mrtg command on the shell, i dont get errors, but when i
          >> execute the same command in my script, i get the errors below.
          >>>
          >>> my script:
          >>> system("/opt/mrtg/bin/mrtg $meudir/$answer0.cfg");
          >>>
          >>> Exec give the same error.
          >>>
          >>> Use of uninitialized value at
          >> /opt/mrtg2/bin/../lib/mrtg2/MRTG_lib.pm line 511.
          >>> ERROR: "WorkDir" not specified in mrtg config file
          >>>
          >>> I dont understand this error, take a look:
          >>> bash-2.03# more /opt/mrtg/clientes/blueone/blueone.cfg
          >>> EnableIPv6: no
          >>> WorkDir: /opt/mrtg/clientes/blueone
          >>>
          >>> Can somebody help me? I appreciate some help.
          >>
          >> One of your two variables, $meudir and $answer0, has not been
          >> given a
          >> value. Check your script.






          ---------------------------------
          Stay in the know. Pulse on the new Yahoo.com. Check it out.

          [Non-text portions of this message have been removed]
        Your message has been successfully submitted and would be delivered to recipients shortly.