mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-19 08:07:13 +02:00
Make install more foolproof; don't include services from odd-ball protocols
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6631 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
655ee396f9
commit
b6cf7699f5
@ -131,6 +131,8 @@ while ( read_a_line1 ) {
|
|||||||
|
|
||||||
my ( $number, $proto ) = split '/', $proto_number;
|
my ( $number, $proto ) = split '/', $proto_number;
|
||||||
|
|
||||||
|
next unless $proto eq 'tcp' || $proto eq 'udp';
|
||||||
|
|
||||||
print_service( $name1 , $number );
|
print_service( $name1 , $number );
|
||||||
|
|
||||||
while ( defined ( $name1 = shift @names ) && $name1 ne '-' ) {
|
while ( defined ( $name1 = shift @names ) && $name1 ne '-' ) {
|
||||||
|
@ -31,6 +31,7 @@ usage() # $1 = exit status
|
|||||||
echo " $ME -v"
|
echo " $ME -v"
|
||||||
echo " $ME -h"
|
echo " $ME -h"
|
||||||
echo " $ME -n"
|
echo " $ME -n"
|
||||||
|
echo " $ME -n -P"
|
||||||
exit $1
|
exit $1
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -110,6 +111,7 @@ if [ -z "$GROUP" ] ; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
NOBACKUP=
|
NOBACKUP=
|
||||||
|
INSTALL_PORTS_PM=Yes
|
||||||
|
|
||||||
while [ $# -gt 0 ] ; do
|
while [ $# -gt 0 ] ; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
@ -123,6 +125,9 @@ while [ $# -gt 0 ] ; do
|
|||||||
-n)
|
-n)
|
||||||
NOBACKUP=Yes
|
NOBACKUP=Yes
|
||||||
;;
|
;;
|
||||||
|
-P)
|
||||||
|
INSTALL_PORTS_PM=
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
usage 1
|
usage 1
|
||||||
;;
|
;;
|
||||||
@ -190,7 +195,7 @@ done
|
|||||||
#
|
#
|
||||||
install_file buildports.pl ${PREFIX}/usr/share/shorewall-perl/buildports.pl 0555
|
install_file buildports.pl ${PREFIX}/usr/share/shorewall-perl/buildports.pl 0555
|
||||||
|
|
||||||
[ -z "$PREFIX" ] && ./buildports.pl > /usr/share/shorewall-perl/Shorewall/Ports.pm && chmod 0555 /usr/share/shorewall-perl/Shorewall/Ports.pm
|
[ -n "$INSTALL_PORTS_PM" ] && ./buildports.pl > /usr/share/shorewall-perl/Shorewall/Ports.pm && chmod 0555 /usr/share/shorewall-perl/Shorewall/Ports.pm
|
||||||
|
|
||||||
echo $VERSION > ${PREFIX}/usr/share/shorewall-perl/version
|
echo $VERSION > ${PREFIX}/usr/share/shorewall-perl/version
|
||||||
#
|
#
|
||||||
|
@ -37,7 +37,7 @@ compilation and execution.
|
|||||||
export PREFIX=$RPM_BUILD_ROOT ; \
|
export PREFIX=$RPM_BUILD_ROOT ; \
|
||||||
export OWNER=`id -n -u` ; \
|
export OWNER=`id -n -u` ; \
|
||||||
export GROUP=`id -n -g` ;\
|
export GROUP=`id -n -g` ;\
|
||||||
./install.sh -n
|
./install.sh -n -P
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
Loading…
x
Reference in New Issue
Block a user