Imported Upstream version 1.4.16_pre1
This commit is contained in:
parent
047baae1ca
commit
212b4b8677
69 changed files with 10803 additions and 2698 deletions
|
@ -1,12 +1,12 @@
|
|||
PKG="NAGplugin"
|
||||
PKG="NGOSplugin"
|
||||
NAME="nagios-plugins"
|
||||
DESC="Nagios network monitoring plugins"
|
||||
ARCH="i386"
|
||||
VERSION="1.4.15,REV=2010.07.27.21.48"
|
||||
ARCH="unknown"
|
||||
VERSION="1.4.15,REV=2012.06.11.23.00"
|
||||
CATEGORY="application"
|
||||
VENDOR="Nagios Plugin Development Team"
|
||||
EMAIL="nagiosplug-devel@lists.sourceforge.net"
|
||||
PSTAMP="nag20100727214823"
|
||||
PSTAMP="nag20120611230042"
|
||||
BASEDIR="/"
|
||||
CLASSES="none"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
PKG="NAGplugin"
|
||||
PKG="NGOSplugin"
|
||||
NAME="nagios-plugins"
|
||||
DESC="Nagios network monitoring plugins"
|
||||
ARCH="@PKG_ARCH@"
|
||||
|
|
35
pkg/solaris/preinstall
Executable file
35
pkg/solaris/preinstall
Executable file
|
@ -0,0 +1,35 @@
|
|||
#!/usr/bin/sh
|
||||
|
||||
user="nagios"
|
||||
uid=-1
|
||||
group="nagios"
|
||||
gid=-1
|
||||
|
||||
/usr/bin/getent group $group > /dev/null 2> /dev/null
|
||||
result=$?
|
||||
if [ $result -eq 2 ] ; then
|
||||
echo "Group $group does not exist. Creating..."
|
||||
if [ $gid -ne -1 ] ; then
|
||||
/usr/sbin/groupadd -g $gid $group
|
||||
else
|
||||
/usr/sbin/groupadd $group
|
||||
fi
|
||||
elif [ $result -ne 0 ] ; then
|
||||
echo "An error occurred determining the existence of the groug $group. Terminating."
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
/usr/bin/getent passwd $user > /dev/null 2> /dev/null
|
||||
result=$?
|
||||
if [ $result -eq 2 ] ; then
|
||||
echo "User $user does not exist. Creating..."
|
||||
if [ $uid -ne -1 ] ; then
|
||||
/usr/sbin/useradd -u $uid -g $group $user
|
||||
else
|
||||
/usr/sbin/useradd -g $group $user
|
||||
fi
|
||||
elif [ $result -ne 0 ] ; then
|
||||
echo "An error occurred determining the existence of the user $user. Terminating."
|
||||
exit 1;
|
||||
fi
|
||||
|
|
@ -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,24 @@ 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 =~ "pst3") {
|
||||
# Needs to be installed SUID root
|
||||
($dir, $none, $file, $mode, $user, $group) = split / /,$thisline;
|
||||
print PROTO "$dir $none $file 4755 root bin\n";
|
||||
|
||||
} 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 +66,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 +86,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";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue