aports/community/psad/01-no-init-autodetection.patch

43 lines
1.4 KiB
Diff

Autodetection is faulty and we use our own init scripts
--- a/install.pl
+++ b/install.pl
@@ -247,37 +247,7 @@
my $distro = &get_distro();
### handle systems with systemd
-my $is_systemd = &look_for_process(qr|/systemd|);
-
-if ($is_systemd) {
- $init_dir = $systemd_init_dir;
- $init_name = $systemd_init_name;
- $cmds{'systemctl'} = $systemctlCmd;
- die "[*] systemd init directory $init_dir does not exist, ",
- "use --systemd-init-dir <path>" unless -d $init_dir;
-} else {
- if ($distro eq 'redhat' or $distro eq 'fedora') {
- ### add chkconfig only if we are runing on a redhat distro
- $cmds{'chkconfig'} = $chkconfigCmd;
- } elsif ($distro eq 'gentoo') {
- ### add rc-update if we are running on a gentoo distro
- $cmds{'rc-update'} = $rcupdateCmd;
- } elsif ($distro eq 'ubuntu') {
- ### add update-rc.d if we are running on an ubuntu distro
- $cmds{'update-rc.d'} = $updatercdCmd;
- }
-
- unless (-d $init_dir) {
- if (-d '/etc/rc.d/init.d') {
- $init_dir = '/etc/rc.d/init.d';
- } elsif (-d '/etc/rc.d') { ### for Slackware
- $init_dir = '/etc/rc.d';
- } else {
- die "[*] Cannot find the init script directory, use ",
- "--init-dir <path>" unless $install_test_dir;
- }
- }
-}
+my $is_systemd = 0;
### need to make sure this exists before attempting to
### write anything to the install log.