mirror of
https://gitlab.com/shorewall/code.git
synced 2025-02-16 17:51:16 +01:00
Configure script corrections for Debian
- Matt Darfeuille and Tom Eastep Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
2c1786422e
commit
f4fef3a931
20
Shorewall-core/configure
vendored
20
Shorewall-core/configure
vendored
@ -102,7 +102,7 @@ if [ -z "$vendor" ]; then
|
|||||||
vendor=redhat
|
vendor=redhat
|
||||||
;;
|
;;
|
||||||
debian|ubuntu)
|
debian|ubuntu)
|
||||||
ls -l /sbin/init |fgrep -q systemd | vendor=debian.systemd | vendor=debian.sysvinit
|
vendor=debian
|
||||||
;;
|
;;
|
||||||
opensuse)
|
opensuse)
|
||||||
vendor=suse
|
vendor=suse
|
||||||
@ -122,7 +122,6 @@ if [ -z "$vendor" ]; then
|
|||||||
params[HOST]=apple
|
params[HOST]=apple
|
||||||
rcfile=shorewallrc.apple
|
rcfile=shorewallrc.apple
|
||||||
;;
|
;;
|
||||||
|
|
||||||
cygwin*|CYGWIN*)
|
cygwin*|CYGWIN*)
|
||||||
params[HOST]=cygwin
|
params[HOST]=cygwin
|
||||||
rcfile=shorewallrc.cygwin
|
rcfile=shorewallrc.cygwin
|
||||||
@ -130,7 +129,7 @@ if [ -z "$vendor" ]; then
|
|||||||
*)
|
*)
|
||||||
if [ -f /etc/debian_version ]; then
|
if [ -f /etc/debian_version ]; then
|
||||||
params[HOST]=debian
|
params[HOST]=debian
|
||||||
rcfile=shorewallrc.debian.sysvinit
|
ls -l /sbin/init | fgrep -q systemd && rcfile=shorewallrc.debian.systemd || rcfile=shorewallrc.debian.sysvinit
|
||||||
elif [ -f /etc/redhat-release ]; then
|
elif [ -f /etc/redhat-release ]; then
|
||||||
params[HOST]=redhat
|
params[HOST]=redhat
|
||||||
rcfile=shorewallrc.redhat
|
rcfile=shorewallrc.redhat
|
||||||
@ -152,12 +151,16 @@ if [ -z "$vendor" ]; then
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
vendor=${params[HOST]}
|
vendor=${params[HOST]}
|
||||||
elif [ $vendor = linux ]; then
|
|
||||||
rcfile=shorewallrc.default;
|
|
||||||
else
|
else
|
||||||
rcfile=shorewallrc.$vendor
|
if [ $vendor = linux ]; then
|
||||||
|
rcfile=shorewallrc.default;
|
||||||
|
elif [ $vendor = debian -a -f /etc/debian_version ]; then
|
||||||
|
ls -l /sbin/init | fgrep -q systemd && rcfile=shorewallrc.debian.systemd || rcfile=shorewallrc.debian.sysvinit
|
||||||
|
else
|
||||||
|
rcfile=shorewallrc.$vendor
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ! -f $rcfile ]; then
|
if [ ! -f $rcfile ]; then
|
||||||
echo "ERROR: $vendor is not a recognized host type" >&2
|
echo "ERROR: $vendor is not a recognized host type" >&2
|
||||||
exit 1
|
exit 1
|
||||||
@ -170,7 +173,7 @@ fi
|
|||||||
if [ $vendor = linux ]; then
|
if [ $vendor = linux ]; then
|
||||||
echo "INFO: Creating a generic Linux installation - " `date`;
|
echo "INFO: Creating a generic Linux installation - " `date`;
|
||||||
else
|
else
|
||||||
echo "INFO: Creating a ${vendor}-specific installation - " `date`;
|
echo "INFO: Creating a $params[HOST]-specific installation - " `date`;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo
|
echo
|
||||||
@ -183,6 +186,7 @@ done
|
|||||||
|
|
||||||
echo '#' > shorewallrc
|
echo '#' > shorewallrc
|
||||||
echo "# Created by Shorewall Core version $VERSION configure - " `date` >> shorewallrc
|
echo "# Created by Shorewall Core version $VERSION configure - " `date` >> shorewallrc
|
||||||
|
echo "# rc file: $rcfile" >> shorewallrc
|
||||||
echo '#' >> shorewallrc
|
echo '#' >> shorewallrc
|
||||||
|
|
||||||
if [ $# -gt 0 ]; then
|
if [ $# -gt 0 ]; then
|
||||||
|
@ -81,7 +81,20 @@ unless ( defined $vendor ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( defined $vendor ) {
|
if ( defined $vendor ) {
|
||||||
$rcfilename = $vendor eq 'linux' ? 'shorewallrc.default' : 'shorewallrc.' . $vendor;
|
if ( $vendor eq 'debian' && -f '/etc/debian_version' ) {
|
||||||
|
if ( -l '/sbin/init' ) {
|
||||||
|
if ( readlink '/sbin/init' =~ /systemd/ ) {
|
||||||
|
$rcfilename = 'debian.systemd';
|
||||||
|
} else {
|
||||||
|
$rcfilename = 'shorewallrc.debian.sysvinit';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$rcfilename = 'shorewallrc.debian.sysvinit';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$rcfilename = $vendor eq 'linux' ? 'shorewallrc.default' : 'shorewallrc.' . $vendor;
|
||||||
|
}
|
||||||
|
|
||||||
unless ( -f $rcfilename ) {
|
unless ( -f $rcfilename ) {
|
||||||
die qq("ERROR: $vendor" is not a recognized host type);
|
die qq("ERROR: $vendor" is not a recognized host type);
|
||||||
} elsif ( $vendor eq 'default' ) {
|
} elsif ( $vendor eq 'default' ) {
|
||||||
@ -90,7 +103,15 @@ if ( defined $vendor ) {
|
|||||||
} else {
|
} else {
|
||||||
if ( -f '/etc/debian_version' ) {
|
if ( -f '/etc/debian_version' ) {
|
||||||
$vendor = 'debian';
|
$vendor = 'debian';
|
||||||
$rcfilename = 'shorewallrc.debian.sysvinit';
|
if ( -l '/sbin/init' ) {
|
||||||
|
if ( readlink '/sbin/init' =~ /systemd/ ) {
|
||||||
|
$rcfilename = 'debian.systemd';
|
||||||
|
} else {
|
||||||
|
$rcfilename = 'shorewallrc.debian.sysvinit';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$rcfilename = 'shorewallrc.debian.sysvinit';
|
||||||
|
}
|
||||||
} elsif ( -f '/etc/redhat-release' ){
|
} elsif ( -f '/etc/redhat-release' ){
|
||||||
$vendor = 'redhat';
|
$vendor = 'redhat';
|
||||||
$rcfilename = 'shorewallrc.redhat';
|
$rcfilename = 'shorewallrc.redhat';
|
||||||
|
Loading…
Reference in New Issue
Block a user