summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Stanley <estanley@nagios.com>2011-12-16 10:29:48 -0600
committerEric Stanley <estanley@nagios.com>2011-12-16 10:29:48 -0600
commit48b42a6d1d43ebae3f9a671148356301d337270e (patch)
tree643403cdaaffd042ecbff6871d43d7e4bb53b2e9
parentce7d5f1a3afe34c78d15f28930e94688d4eafa0f (diff)
downloadmonitoring-plugins-48b42a6d1d43ebae3f9a671148356301d337270e.tar.gz
Commit files which were inadvertently omitted from the previous commit.
-rw-r--r--Makefile.am1
-rw-r--r--pkg/solaris/pkginfo.in2
-rwxr-xr-xpkg/solaris/solpkg10
3 files changed, 9 insertions, 4 deletions
diff --git a/Makefile.am b/Makefile.am
index b6e5f2ec..8e2de783 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -46,6 +46,7 @@ solpkg:
46 $(MAKE) all 46 $(MAKE) all
47 $(MAKE) DESTDIR=$$PWD/$(BUILDDIR) install 47 $(MAKE) DESTDIR=$$PWD/$(BUILDDIR) install
48 $(INSTALL) pkg/solaris/pkginfo $(BUILDDIR) 48 $(INSTALL) pkg/solaris/pkginfo $(BUILDDIR)
49 $(INSTALL) pkg/solaris/preinstall $(BUILDDIR)
49 cd $(BUILDDIR) && $(PERL) ../$(PKGSCRIPT) ../$(PACKDIR) 50 cd $(BUILDDIR) && $(PERL) ../$(PKGSCRIPT) ../$(PACKDIR)
50 51
51THANKS: THANKS.in 52THANKS: THANKS.in
diff --git a/pkg/solaris/pkginfo.in b/pkg/solaris/pkginfo.in
index c9dcced0..3bed3464 100644
--- a/pkg/solaris/pkginfo.in
+++ b/pkg/solaris/pkginfo.in
@@ -1,4 +1,4 @@
1PKG="NAGplugin" 1PKG="NGOSplugin"
2NAME="nagios-plugins" 2NAME="nagios-plugins"
3DESC="Nagios network monitoring plugins" 3DESC="Nagios network monitoring plugins"
4ARCH="@PKG_ARCH@" 4ARCH="@PKG_ARCH@"
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";
8$pkgtrans = "/usr/bin/pkgtrans"; 8$pkgtrans = "/usr/bin/pkgtrans";
9$prototype = "prototype"; 9$prototype = "prototype";
10$pkginfo = "pkginfo"; 10$pkginfo = "pkginfo";
11$preinstall = "preinstall";
11$egrep = "/usr/bin/egrep"; 12$egrep = "/usr/bin/egrep";
12 13
13# Sanity check 14# Sanity check
@@ -24,17 +25,19 @@ open (PREPROTO,"$find . -print |$egrep -v \"^\.(/usr(/local)?|/opt)?\$\" | $pkgp
24open (PROTO,">$prototype") || 25open (PROTO,">$prototype") ||
25 die "Unable to write file prototype ($!)\n"; 26 die "Unable to write file prototype ($!)\n";
26print PROTO "i pkginfo=./$pkginfo\n"; 27print PROTO "i pkginfo=./$pkginfo\n";
28print PROTO "i preinstall=./$preinstall\n";
27while (<PREPROTO>) { 29while (<PREPROTO>) {
28 # Read in the prototype information 30 # Read in the prototype information
29 chomp; 31 chomp;
30 $thisline = $_; 32 $thisline = $_;
31 if ($thisline =~ " prototype " 33 if ($thisline =~ " prototype "
32 or $thisline =~ " pkginfo ") { 34 or $thisline =~ " pkginfo "
35 or $thisline =~ " preinstall ") {
33 # Don't do anything as they aren't important 36 # Don't do anything as they aren't important
34 } elsif ($thisline =~ "^[fd] ") { 37 } elsif ($thisline =~ "^[fd] ") {
35 # Change the ownership of files and directories 38 # Change the ownership of files and directories
36 ($dir, $none, $file, $mode, $user, $group) = split / /,$thisline; 39 ($dir, $none, $file, $mode, $user, $group) = split / /,$thisline;
37 print PROTO "$dir $none $file $mode bin bin\n"; 40 print PROTO "$dir $none $file $mode $user bin\n";
38 } else { 41 } else {
39 # Symlinks and other stuff should be printed also 42 # Symlinks and other stuff should be printed also
40 print PROTO "$thisline\n"; 43 print PROTO "$thisline\n";
@@ -58,6 +61,7 @@ while (<PKGINFO>) {
58 $thisline = $_; 61 $thisline = $_;
59 ($var,$value) = split /=/,$thisline; 62 ($var,$value) = split /=/,$thisline;
60 if ("$var" eq "NAME" 63 if ("$var" eq "NAME"
64 or "$var" eq "PKG"
61 or "$var" eq "VERSION" 65 or "$var" eq "VERSION"
62 or "$var" eq "ARCH") { 66 or "$var" eq "ARCH") {
63 $tmp = lc($var); 67 $tmp = lc($var);
@@ -77,5 +81,5 @@ $packagename = "$name-$version-$os-$arch-local";
77 81
78print "Building package\n"; 82print "Building package\n";
79system ("$pkgmk -o -r `pwd` -d $pkgdevice"); 83system ("$pkgmk -o -r `pwd` -d $pkgdevice");
80system ("(cd $pkgdevice && $pkgtrans -s `pwd` ../$packagename)"); 84system ("(cd $pkgdevice && $pkgtrans -s `pwd` ../$packagename $pkg)");
81print "Done. ($packagename)\n"; 85print "Done. ($packagename)\n";