Skip to content

Instantly share code, notes, and snippets.

@nicman23
nicman23 / paccheck-lite.sh
Created January 12, 2019 14:36
paccheck checking only the existance and size of the the reported files, going to the next package on first error.
#! /usr/bin/bash
pacman -Qsq | while read line;
do echo \> checking $line; pacman -Qlq $line | grep -vP '^/etc' | grep -vP '/$' |
while read line2
do if [[ ! -e "$line2" ]] && [[ ! -s "$line2" ]]
then echo $line $line2 | tee -a corrupt; break
fi
done
done
@nicman23
nicman23 / upgrade
Created April 21, 2018 06:34
Openwrt upgrade script
#!/bin/sh /etc/rc.common
START=99
USE_PROCD=1
start_service() {
if [ -e /root/.upgrade ]
then exit
else touch /root/.upgrade
fi