Skip to content

Commit

Permalink
Update README and scripts for WSL setup: fix command options and impr…
Browse files Browse the repository at this point in the history
…ove comments
  • Loading branch information
andreww committed Jan 9, 2025
1 parent 0cd1e93 commit 78ef130
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ $wslinitalsetup | wsl --user root --distribution ${DistroName} --
wsl --set-default ${DistroName}
## restart, so systemd get enabled
wsl --terminate ${DistroName}
wsl --manage ${DistroName} --set-sparse
wsl --manage ${DistroName} --set-sparse true
```

Expand Down
4 changes: 1 addition & 3 deletions wsl/wslfirstsetup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,12 @@ if [[ $(grep -i WSL2 /proc/sys/kernel/osrelease) ]] ; then
usermod -a -G docker ${USERNAME}
fi

## set password
echo -e '${STRONGPASSWORD}\n${STRONGPASSWORD}\n' | passwd ${USERNAME}
else
echo "Sorry, only supports WSL2 (not WSL1)"
exit 1
fi

## Template: EnvironMent Variables for proxy support
## Template: Environment Variables for proxy support
sh -c 'echo "## Web Proxy Setup - edit as required" > /etc/profile.d/web-proxy.sh'
sh -c 'echo "## Squid default port is 3128, but many setup the proxy on port 80,8000,8080" >> /etc/profile.d/web-proxy.sh'
sh -c 'echo "anon_web-proxy() {" >> /etc/profile.d/web-proxy.sh'
Expand Down
10 changes: 5 additions & 5 deletions wsl/wslsetup2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ if [ ! -x "$(command -v docker)" ] ; then

## install docker
curl -fsSL https://get.docker.com -o get-docker.sh
sudo chmod 755 get-docker.sh --channel test
sudo sh ./get-docker.sh
sudo chmod 755 get-docker.sh
sudo sh ./get-docker.sh --channel test

## verify
sudo docker run hello-world
Expand All @@ -166,7 +166,7 @@ if [ ! -x "$(command -v docker)" ] ; then
docker run -it -p 8888:8888 -e ACCEPT_EULA=yes mcr.microsoft.com/mmlspark/release

## set controlable via Docker Desktop (docker on docker)
sudo sh -c 'echo "export DOCKER_HOST=tcp://localhost:2375" > /etc/profile.d/docker.sh'
#sudo sh -c 'echo "export DOCKER_HOST=tcp://localhost:2375" > /etc/profile.d/docker.sh'
fi

## install WASM
Expand Down Expand Up @@ -217,7 +217,7 @@ oracleinstantclientinstall() {
### Environment variables for Oracle Instance Client
### https://docs.oracle.com/en/database/oracle/oracle-database/21/lacli/environment-variables-instant-client.html
sudo sh -c "echo # Oracle Instant Client Setup > /etc/profile.d/instant-oracle.sh"
sudo sh -c "echo oracle-instantclient\(\) { >> /etc/profile.d/instant-oracle.sh"
sudo sh -c "echo oracle-instantclient\(\) { >> /etc/profile.d/instant-oracle.sh"
sudo sh -c "echo export LD_LIBRARY_PATH=$1 >> /etc/profile.d/instant-oracle.sh"
sudo sh -c "echo export PATH=$1:'\$PATH' >> /etc/profile.d/instant-oracle.sh"
sudo sh -c "echo } >> /etc/profile.d/instant-oracle.sh"
Expand Down Expand Up @@ -561,4 +561,4 @@ touch $HOME/.hushlogin
export CMD_INSTALL=
export CMD_UPGRADE=
export CMD_UPDATE=
export CMD_CLEAN=
export CMD_CLEAN=

0 comments on commit 78ef130

Please sign in to comment.