~ubuntu-branches/ubuntu/maverick/system-tools-backends/maverick

« back to all changes in this revision

Viewing changes to Utils/File.pm

  • Committer: Bazaar Package Importer
  • Author(s): Chris Coulson
  • Date: 2010-02-04 23:46:30 UTC
  • mfrom: (1.1.29 upstream) (1.2.5 sid)
  • Revision ID: james.westby@ubuntu.com-20100204234630-nvy5v68fd8a429s0
Tags: 2.9.1-0ubuntu1
* Sync with Debian testing
* New upstream release (LP: #506365)
  - New users and groups protocol
  - Fix D-Bus .service files to work with new users and groups version
  - Add a new authentication interface allowing to check for PolicyKit 
    authorizations before committing
  - Fix SelfConfig and improve security checks
* debian/watch:
  - Watch 2.9.x series
* debian/control:
  - Bump libpolkit-gobject-1-dev build-dep
* Drop debian/patches/08_use_md5t.patch: Obsolete with new version
* Refresh 02ubuntu_chmod_network_interfaces_when_using_key.patch
* debian/patches/04_dont_use_authen_pam.patch:
  - Drop superfluous "use Authen::PAM", as it's not needed

Show diffs side-by-side

added added

removed removed

Lines of Context:
770
770
 
771
771
  $tool_path = &locate_tool ($cmd);
772
772
  return -1 if ($tool_path eq "");
773
 
  return -1 if $command == -1;
 
773
  return -1 if $cmd == -1;
774
774
 
775
775
  $command = join (" ", ($tool_path, @arguments));
776
776
  &Utils::Report::do_report ("file_run_full", $command);
777
 
  &Utils::Report::leave ();
778
777
 
779
778
  my $pid = fork();
780
779
 
785
784
    $ENV{"LC_ALL"} = "C";
786
785
    open (STDOUT, "/dev/null");
787
786
    open (STDERR, "/dev/null");
788
 
    exec ($tool_path, @arguments);
789
 
    exit (0);
 
787
    system ($tool_path, @arguments);
 
788
 
 
789
    # As documented in perlfunc, divide by 256.
 
790
    exit ($? / 256);
790
791
  }
791
792
 
792
793
  # If no error has occurred so far, assume success,
795
796
 
796
797
  waitpid ($pid, 0);
797
798
 
798
 
  # As documented in perlfunc, divide by 256.
799
 
  return ($? / 256);
 
799
  if ($? != 0)
 
800
  {
 
801
    &Utils::Report::do_report ("file_run_full_failed", $command);
 
802
  }
 
803
 
 
804
  &Utils::Report::leave ();
 
805
 
 
806
  return ($?);
800
807
}
801
808
 
802
809
# Simple wrappers calling &run_full() with the right background parameter