Skip to content

Commit 1bd4b20

Browse files
committed
Simplify make install.* examples
We use PRFIX=/opt/socket_vment by default, and we recommend to use the default location for good reasons. Show the recommend commands without the unneeded PREFIX. Mention PREFIX in the next paragraph about avoiding bad locations like /usr/local. Using non-default location introduces the risk of using a directory writable by unprivileged user and complicates lima configuration which defaults to /opt/socket_vmnet. Signed-off-by: Nir Soffer <[email protected]>
1 parent 87ad870 commit 1bd4b20

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -151,19 +151,20 @@ sudo port unload socket_vmnet
151151
<p>
152152

153153
```bash
154-
sudo make PREFIX=/opt/socket_vmnet install.bin
154+
sudo make install.bin
155155
```
156156

157-
The `PREFIX` dir below does not necessarily need to be `/opt/socket_vmnet`, however, it is highly recommended
158-
to set the prefix to a directory that can be only written by the root.
159-
160-
Note that `/usr/local/bin` is sometimes chowned for a non-admin user, so `/usr/local` is *not* an appropriate prefix.
161-
162-
The binaries will be installed onto the following paths:
157+
This installs binaries using `PREFIX=/opt/socket_vmnet`:
163158
- `/opt/socket_vmnet/bin/socket_vmnet`
164159
- `/opt/socket_vmnet/bin/socket_vmnet_client`
165160

161+
You can customize the install location using the `PREFIX` environment variable,
162+
however, it is highly recommended to set the prefix to a directory that can be
163+
only written by the root. Note that `/usr/local/bin` is sometimes chowned for a
164+
non-admin user, so `/usr/local` is *not* an appropriate prefix.
165+
166166
Run the following command to start the daemon:
167+
167168
```bash
168169
sudo /opt/socket_vmnet/bin/socket_vmnet --vmnet-gateway=192.168.105.1 /var/run/socket_vmnet
169170
```
@@ -177,7 +178,7 @@ sudo /opt/socket_vmnet/bin/socket_vmnet --vmnet-gateway=192.168.105.1 /var/run/s
177178

178179
To install the launchd service:
179180
```bash
180-
sudo make PREFIX=/opt/socket_vmnet install.launchd
181+
sudo make install.launchd
181182
```
182183

183184
The launchd unit file will be installed as `/Library/LaunchDaemons/io.github.lima-vm.socket_vmnet.plist`.
@@ -191,10 +192,9 @@ Stdout | `/var/log/socket_vmnet/stdout`
191192
Stderr | `/var/log/socket_vmnet/stderr`
192193
Gateway | 192.168.105.1
193194

194-
195195
To uninstall the launchd service:
196196
```bash
197-
sudo make PREFIX=/opt/socket_vmnet uninstall.launchd
197+
sudo make uninstall.launchd
198198
```
199199

200200
</p>

0 commit comments

Comments
 (0)