diff options
author | Eric Stanley <estanley@nagios.com> | 2011-12-16 10:29:48 -0600 |
---|---|---|
committer | Eric Stanley <estanley@nagios.com> | 2011-12-16 10:29:48 -0600 |
commit | 48b42a6d1d43ebae3f9a671148356301d337270e (patch) | |
tree | 643403cdaaffd042ecbff6871d43d7e4bb53b2e9 /pkg/solaris/solpkg | |
parent | ce7d5f1a3afe34c78d15f28930e94688d4eafa0f (diff) | |
download | monitoring-plugins-48b42a6d1d43ebae3f9a671148356301d337270e.tar.gz |
Commit files which were inadvertently omitted from the previous commit.
Diffstat (limited to 'pkg/solaris/solpkg')
-rwxr-xr-x | pkg/solaris/solpkg | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/pkg/solaris/solpkg b/pkg/solaris/solpkg index 41d8e177..6307bcd7 100755 --- a/pkg/solaris/solpkg +++ b/pkg/solaris/solpkg @@ -8,6 +8,7 @@ $pkgmk = "/usr/bin/pkgmk"; $pkgtrans = "/usr/bin/pkgtrans"; $prototype = "prototype"; $pkginfo = "pkginfo"; +$preinstall = "preinstall"; $egrep = "/usr/bin/egrep"; # Sanity check @@ -24,17 +25,19 @@ open (PREPROTO,"$find . -print |$egrep -v \"^\.(/usr(/local)?|/opt)?\$\" | $pkgp open (PROTO,">$prototype") || die "Unable to write file prototype ($!)\n"; print PROTO "i pkginfo=./$pkginfo\n"; +print PROTO "i preinstall=./$preinstall\n"; while (<PREPROTO>) { # Read in the prototype information chomp; $thisline = $_; if ($thisline =~ " prototype " - or $thisline =~ " pkginfo ") { + or $thisline =~ " pkginfo " + or $thisline =~ " preinstall ") { # Don't do anything as they aren't important } elsif ($thisline =~ "^[fd] ") { # Change the ownership of files and directories ($dir, $none, $file, $mode, $user, $group) = split / /,$thisline; - print PROTO "$dir $none $file $mode bin bin\n"; + print PROTO "$dir $none $file $mode $user bin\n"; } else { # Symlinks and other stuff should be printed also print PROTO "$thisline\n"; @@ -58,6 +61,7 @@ while (<PKGINFO>) { $thisline = $_; ($var,$value) = split /=/,$thisline; if ("$var" eq "NAME" + or "$var" eq "PKG" or "$var" eq "VERSION" or "$var" eq "ARCH") { $tmp = lc($var); @@ -77,5 +81,5 @@ $packagename = "$name-$version-$os-$arch-local"; print "Building package\n"; system ("$pkgmk -o -r `pwd` -d $pkgdevice"); -system ("(cd $pkgdevice && $pkgtrans -s `pwd` ../$packagename)"); +system ("(cd $pkgdevice && $pkgtrans -s `pwd` ../$packagename $pkg)"); print "Done. ($packagename)\n"; |