wsl2-systemd script 2

This commit is contained in:
2023-07-10 13:58:27 +00:00
parent 547cfb10e0
commit eb48e0cf22
3 changed files with 18 additions and 15 deletions

View File

@@ -648,19 +648,22 @@ if [ "$ANSWER" == "y" ] || [ "$ANSWER" == "Y" ] || [ "$ANSWER" == "" ]; then
registry.format.hu/installer-tool
fi
# enable systemd support on current images
echo "Would you like to install and enable systemd support? (Y/n)";
read -r ANSWER;
if [ "$ANSWER" == "y" ] || [ "$ANSWER" == "Y" ] || [ "$ANSWER" == "" ] ; then
# running on WSL
if [ -n "$WSL_DISTRO_NAME" ]; then
# enable systemd support on current images
echo "Would you like to install and enable systemd support? (Y/n)";
read -r ANSWER;
if [ "$ANSWER" == "y" ] || [ "$ANSWER" == "Y" ] || [ "$ANSWER" == "" ] ; then
# Run installer tool
$SUDO_CMD docker run \
--env WSL2=true \
--env SUDO_CMD=$SUDO_CMD \
--volume $HOME/.ssh/installer:/root/.ssh/id_rsa \
--volume /etc/user/:/etc/user/ \
--volume /etc/system/:/etc/system/ \
registry.format.hu/installer-tool
# Run installer tool
$SUDO_CMD docker run \
--env WSL_DISTRO_NAME=$WSL_DISTRO_NAME \
--env SUDO_CMD=$SUDO_CMD \
--volume $HOME/.ssh/installer:/root/.ssh/id_rsa \
--volume /etc/user/:/etc/user/ \
--volume /etc/system/:/etc/system/ \
registry.format.hu/installer-tool
fi;
fi;
shopt -s expand_aliases