File tree Expand file tree Collapse file tree 4 files changed +9
-4
lines changed
distribution/packages/src/common/scripts
qa/os/src/test/java/org/elasticsearch/packaging/test Expand file tree Collapse file tree 4 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 3
3
# opensuse 15 has a missing dep for systemd
4
4
5
5
if which zypper > /dev/null ; then
6
- sudo zypper install -y insserv-compat
6
+ sudo zypper install -y insserv-compat systemd-sysvcompat
7
7
fi
8
8
9
9
if [ -e /etc/sysctl.d/99-gce.conf ]; then
Original file line number Diff line number Diff line change @@ -119,4 +119,9 @@ if [ "$RESTART_ON_UPGRADE" = "true" ]; then
119
119
echo " OK"
120
120
fi
121
121
122
+ # For SysV compatibility on systemd systems ensure that all rc*.d directories exist
123
+ if [ -x /usr/lib/systemd/systemd-sysv-install ]; then
124
+ mkdir -p /etc/init.d/rc{0..6}.d
125
+ fi
126
+
122
127
@scripts.footer@
Original file line number Diff line number Diff line change @@ -200,7 +200,7 @@ public void test50Remove() throws Exception {
200
200
}
201
201
202
202
assertThat (sh .runIgnoreExitCode ("systemctl status elasticsearch.service" ).exitCode , is (statusExitCode ));
203
- assertThat (sh .runIgnoreExitCode ("systemctl is-enabled elasticsearch.service" ).exitCode , is ( 1 ));
203
+ assertThat (sh .runIgnoreExitCode ("systemctl is-enabled elasticsearch.service" ).exitCode , not ( 0 ));
204
204
205
205
}
206
206
Original file line number Diff line number Diff line change 29
29
import static org .elasticsearch .packaging .util .Packages .verifyPackageInstallation ;
30
30
import static org .elasticsearch .packaging .util .Platforms .isSystemd ;
31
31
import static org .elasticsearch .packaging .util .ServerUtils .enableGeoIpDownloader ;
32
- import static org .hamcrest .core . Is . is ;
32
+ import static org .hamcrest .Matchers . not ;
33
33
import static org .junit .Assume .assumeTrue ;
34
34
35
35
public class RpmPreservationTests extends PackagingTestCase {
@@ -85,7 +85,7 @@ public void test30PreserveConfig() throws Exception {
85
85
assertRemoved (distribution ());
86
86
87
87
if (isSystemd ()) {
88
- assertThat (sh .runIgnoreExitCode ("systemctl is-enabled elasticsearch.service" ).exitCode , is ( 1 ));
88
+ assertThat (sh .runIgnoreExitCode ("systemctl is-enabled elasticsearch.service" ).exitCode , not ( 0 ));
89
89
}
90
90
91
91
assertPathsDoNotExist (
You can’t perform that action at this time.
0 commit comments