Kho tháng 5/2025
Sun May 18 11:58:13 AM CEST 2025
When you're a creature of habits, breaking routines can have devastating effects
Case in point. Woke up too early this morning. Forgot to get the meat out to defrost. Now I have some sort of stew instead of the usual pasta.
Thu May 15 05:47:24 PM CEST 2025
There's a limit how long a game should last
Feeling burned out near the end game of Baldur's Gate 3 after 118 hours. Like A Dragon: Infinite Wealth was also 119. So the limit is probably 110 or so. Kept on playing Yakuza: Like A Dragon even after finishing, and total time was just one hour short of 110.
Sun May 11 10:56:27 PM CEST 2025
That's not fair Brandon
I was going slow, and since Wind and Truth is the biggest, I expected it to last one if not two months. Then 10% into the book, the heat was turned up eleven. That's not supposed to happen until the end of the book! Brandon cheated.
Sat May 10 09:14:38 AM CEST 2025
Hotplug the phone as USB ethernet device
It seems USB has been extended to support Ethernet as well. Or that has been forever, I just never cared. But either way, following gentoo wiki allows the creation of /etc/init.d/net.enp0s20f0u2. Then you can just start it to get Internet.
But starting manually is boring, especially when you have to
disconnect phone to go somewhere for a bit, then go back and do
everything over again. This thing has to do with udev, and
udevadm monitor
does show
UDEV [119189.616972] move /devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.0/net/enp0s20f0u2 (net)
Good. We actually got a new network device detected. So we can set up scripts to act on it. Luckily it looks like /lib/udev/rules.d/90-network.rules already has
SUBSYSTEM=="net", ACTION=="add", RUN+="net.sh $name start"
So it should work already? net.sh is /lib/udev/net.sh which belongs to netifrc package. So it looks like things are already set up, on the scripting side at least.
Trying plugging in again, I see in /var/log/syslog
May 10 09:13:20 tro netplugd[24625]: enp0s20f0u2: can't get flags: No such device
May 10 09:09:13 tro kernel: rndis_host 1-2:1.0 enp0s20f0u2: renamed from eth0
May 10 09:09:13 tro /etc/init.d/net.enp0s20f0u2[28533]: net.enp0s20f0u2: not allowed to be hotplugged
I'm still not sure where that message comes from (though the
net.enp0s20f0u2 part implies it's either some shell function, or
command indirectly used by this init script). Somehow I was led to
/etc/rc.conf which does describe a bit more about rc_hotplug
, and
changing it to
rc_hotplug="net.enp0s20f0u2"
seems to do the job. Not even need to restart Linux or anything.
PS. the error message comes from openrc-run.c