-
-
Save bartoszek/c2469ccde084297b575a06296a886766 to your computer and use it in GitHub Desktop.
Generate Ubuntu Trusty container that will boot under systemd-nspawn
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
#!/usr/bin/env bash | |
function __main | |
{ | |
local -r path="$(realpath "${1:-.}")" | |
debootstrap --variant=buildd trusty "$1" http://archive.ubuntu.com/ubuntu/ | |
patch --unified "$path/etc/init/console.conf" <<'EOF' | |
@@ -3,7 +3,8 @@ | |
# This service maintains a getty on console from the point the system is | |
# started until it is shut down again. | |
-start on stopped rc RUNLEVEL=[2345] and container CONTAINER=lxc | |
+start on stopped rc RUNLEVEL=[2345] and (container CONTAINER=lxc or | |
+ container CONTAINER=systemd-nspawn) | |
stop on runlevel [!2345] | |
EOF | |
} | |
__main "$@" | |
exit "$!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
remove /etc/shadow patch - no longer needed.