netbsd

Install an individual set on NetBSD

Save your settings, and run commands like this to install a single set to your system:

- save your settings first
# tar -cvJpf etc.tar.xz /etc
# tar -Jxvpf base.tar.xz -C /
- do the same with other sets except for etc and xetc

# etcupdate -av -s etc.tar.xz -s xetc.tar.xz
# postinstall fix

Then reboot to be on the safe side.

Fekete Zoltán Wed, 05/22/2019 - 10:29
Rebuild installed packages for a certain host in pkgsrc

You have a machine (a master host) with several idividually installed packages. You want those packages to be rebuilt somewhere else (slave host). Do this:

1. On the master host
# pkg_info -Q PKGPATH -a > pkgs_i_want_to_have
2. Copy the generated file to the slave host, and issue as root:
# cat pkgs_i_want_to_have | (while read pp ; do cd /usr/pkgsrc/$pp ; make && make install ; done)

Simple enough, eh?

Fekete Zoltán Tue, 04/30/2019 - 09:23
netstat

Use this command to list all listening IPV4 ports with ip and port numbers:

$ netstat -anl -f inet
Fekete Zoltán Wed, 01/16/2019 - 11:48
Start LXDE on NetBSD
After installing LXDE either from binary or from pkgsrc, it wouldn't start. Here is how to solve:
Fekete Zoltán Wed, 04/18/2018 - 14:25

Tags

Setting up fancy prompt in Korn Shell (ksh)

Put this line into your ~/.shrc:

export PS1="$(echo -e "\033[31m$(whoami)\033[00m@$(hostname -s): \$PWD $") "

Change coloring as you wish by tuning  \e[31m and \e[00m parts.

For color codes and further information see the link attached.

Fekete Zoltán Thu, 01/25/2018 - 11:04
NetBSD letsencrypt certificate installation with certbot for Apache
certbot client has a limited functionality on NetBSD. However you can use it fully functional following these steps:
Fekete Zoltán Sun, 12/17/2017 - 13:19
Don't use poweroff on NetBSD

poweroff command simply doesn't run shutdown scripts. It causes several dirty killing of running processes, etc.

Use always

# shutdown -p now

instead.

Fekete Zoltán Wed, 11/22/2017 - 08:17