shithub: rc

Download patch

ref: 67f47b416fafba07c83099eb899f1e20a530f908
parent: 6df9312492956c6f8a9ac74a40e30a421d07430c
author: qwx <qwx@sciops.net>
date: Sun Oct 23 00:40:53 EDT 2022

nopedog: fix for probably the 20th time

--- a/bin/nopedog
+++ b/bin/nopedog
@@ -1,7 +1,9 @@
 #!/bin/rc
 rfork n
-if(! test -f /dev/battery)
-	exit no battery to hand
+if(! test -r /dev/battery){
+	if(! mount -a '#s'/acpi /dev || ! test -r /dev/battery)
+		exit 'no battery to hand'
+}
 # safer to assume that if one battery has dipped very low and we're not charging,
 # either it has to be removed or replaced, or we're in a danger zone
 # total capacity is taken from design capacity and ratio will be lower, as a