-
-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Addressing crashing hosts when developing docker containers.
- Loading branch information
Showing
3 changed files
with
23 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
devshop-logo "Cleaning up SystemD" | ||
echo "This should only be run inside a container with SystemD." | ||
echo "See https://github.com/geerlingguy/docker-ubuntu1804-ansible/pull/12" | ||
|
||
# @TODO: Make this multi-os, and determine if there are any unwanted side effects. | ||
# The "ls" command should fail, breaking any build without this path. | ||
ls -la /lib/systemd | ||
|
||
find /lib/systemd/system/sysinit.target.wants/* ! -name systemd-tmpfiles-setup.service -delete; | ||
rm -f /lib/systemd/system/multi-user.target.wants/*; | ||
rm -f /etc/systemd/system/*.wants/*; | ||
rm -f /lib/systemd/system/local-fs.target.wants/*; | ||
rm -f /lib/systemd/system/sockets.target.wants/*udev*; | ||
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; | ||
rm -f /lib/systemd/system/basic.target.wants/*; | ||
rm -f /lib/systemd/system/anaconda.target.wants/*;find /lib/systemd/system/sysinit.target.wants/* ! -name systemd-tmpfiles-setup.service -delete; |