Skip to content

Commit

Permalink
Removed boot script copy, and adjusted line endings
Browse files Browse the repository at this point in the history
  • Loading branch information
Lody Borgers committed Feb 23, 2022
1 parent 7b443d7 commit 84be5c7
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# My `.dotfiles`
version: 1.6.0
version: 1.6.1

This repo is my collection of dotfiles that I use across setups (like personal and work computers).
It's based on and heavily influenced on a number of other people's work (referenced in [credits](#credits)).
Expand Down Expand Up @@ -58,8 +58,14 @@ WSL2 is a strange beast, in that it has a fully virtualized network adapter. Thi
but other in my network can't. Luckily, [Alex-D has a bridge script](https://github.com/Alex-D/dotfiles#wsl-bridge) which opens up some ports by default.
If a port needs to be added, just change the script and run `wslb` or `wslbridge`.

When running the config, it will copy the boot script `wsl/rc_local` into `/etc/` on the WSL machine. This script, which is run on every boot of the WSL VM,
runs the WSL Bridge script. It will set up the ports automatically. However, when we run this install, WSL is already running. So in that case we just need to run the alias `wslb` or `wslbridge`.
There is a boot script called `wsl/rc_local` which can be copied into `/etc/rc.local` (note the rename!) on the WSL machine. This script, which will be run on every boot of the WSL VM, runs the WSL Bridge script. It will set up the ports automatically. You can copy it as root user:

```shell
sudo cp $DOTFILES/wsl/rc_local /etc/rc.local
```

You need to run this manually, since the install cannot do that (because of permissions).
Also, when we run this install, WSL is already running. So in that case we just need to run the alias `wslb` or `wslbridge`.

#### WSL2 and IP's
WSL2 is using a full on network interface to communicate with. This means that local servers in WSL2 can be accessed with the (special) `localhost` hostname,
Expand Down
1 change: 0 additions & 1 deletion meta/configs/taf.conf.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
- shell:
- [cp ./windows-terminal/settings.json /mnt/c/Users/l.borgers/AppData/Local/Packages/Microsoft.WindowsTerminal_8wekyb3d8bbwe/LocalState/settings.json, Copying Windows Terminal settings]
- [cp ./wsl/wsl2-bridge.ps1 /mnt/c/Users/l.borgers/wsl2-bridge.ps1, Copying the WSL2 Bridge script]
- [cp ./wsl/rc_local.sh /etc/rc.local, Copying the boot script for Ubuntu]
10 changes: 5 additions & 5 deletions oh-my-zsh/taf/aliases.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# TAF-specific aliases

# Run the linux update alias, and add some own updates to it
alias powershell="powershell.exe"
alias padmin="powershell 'Start-Process powershell -Verb runAs'"
alias ipconfig="powershell ipconfig"
#alias powershell="powershell.exe"
#alias padmin="powershell 'Start-Process powershell -Verb runAs'"
#alias ipconfig="powershell ipconfig"
alias update='sudo apt update; sudo apt upgrade -y; nvm install --lts; npm install npm -g; npm update -g; powershell wsl --update';

# CAUTION: If you change this line, reflect those changes in wsl/rc_local.sh
alias wslb="powershell 'Start-Process PowerShell -Verb RunAs \"PowerShell -File \$env:USERPROFILE\\wsl2-bridge.ps1\"'"
alias wslbridge=wslb
#alias wslb="powershell 'Start-Process PowerShell -Verb RunAs \"PowerShell -File \$env:USERPROFILE\\wsl2-bridge.ps1\"'"
#alias wslbridge=wslb
2 changes: 1 addition & 1 deletion oh-my-zsh/taf/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
source "$(dirname "$0")/aliases.sh"

# Load functions
source "$(dirname "$0")/functions.sh"
#source "$(dirname "$0")/functions.sh"

0 comments on commit 84be5c7

Please sign in to comment.