Fixing a blinking Windows Terminal
Connecting to my OmniOS NAS from the Windows 10 Terminal causes a blinking issue in nano. I usually fix it with: % export TERM=vt100 But I sometimes forget - which can be a health risk. I don’t want this in my shell config, since other terminal emulators work fine and need better TERM settings. So I added this to my .ssh/config on the Windows machine:...
Automatically load IPF rules after reboot
I had configured some firewall rules on my NAS, which initially seemed to work correctly. However, I later noticed that the rules were not being applied after the NAS was rebooted. I began investigating the issue. First, I removed all customizations and disabled, then re-enabled the IP filter service. After rebooting the NAS, I examined the current state of the system: root@omnios:~# svcs |grep ipf...
Cron based ZFS snapshot
ZFS snapshots are a simple and secure way to store a read-only state of a file system that can be restored in the event of accidental data loss, transferred, and replicated to another machine for backup. I wanted the NAS to take a snapshot every day and keep the last 7 snapshots. Here’s how I did it: # cat zfs_snapshot_create.sh #!/usr/bin/env zsh # Daily ZFS...
Interfacing an analog joystick using Forth
pin import adc import 26 constant x_pin ( GPIO pin of the X axis ) 27 constant y_pin ( GPIO pin of the Y axis ) 2 constant button_pin ( GPIO pin used for the button ) button_pin pull-up-pin ( Defining the button pin as pull-up ) : get-adc-chan pin-adc-chan ; ( Getting the ADC channel of the passed pin ) : x-pin-adc x_pin get-adc-chan...
Transmission in pkgsrc zone on OmniOS
We will use zadm for zone administration, installation is simple: # pkg install zadm We need a vnic for our zone, so let’s create an instance: # dladm create-vnic -l e1000g0 zone_transmission_0 Then set up the zone with zadm: # zadm create -b pkgsrc transmission The zone config will open in your $EDITOR, modify it like shown below: { "autoboot" : "true", "bootargs" : "",...