This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
/usr/bin/upsmon -K >/dev/null 2>&1 | |
if [ -f "/etc/killpower" ]; then /usr/bin/upsdrvctl shutdown; fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Wait for NAS to shut down | |
while ping -c 1 -W 1 192.168.11.3 &>/dev/null ; do | |
sleep 5 | |
done | |
# Shutdown system | |
/sbin/shutdown -h +0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
red='\033[02;31m' | |
green='\033[01;32m' | |
nocolor='\033[0m' | |
uname=`uname -a | awk -F " " '{print $1 " " $2 " " $3 " " $4 " " $5}'` | |
lastlog=`lastlog -u $USER | tail -n 1 | awk '{print $4 " " $5 " " $6 " " $7 " from " $3}'` | |
uptime=`cut -d. -f1 /proc/uptime` | |
up_days=`expr $uptime / 60 / 60 / 24` | |
up_hours=`expr $uptime / 60 / 60 % 24` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/sbin/sh | |
# | |
# /system/addon.d/90-example.sh | |
# | |
. /tmp/backuptool.functions | |
case "$1" in | |
backup) | |
# Stub | |
;; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
repo forall -pvc ' | |
if git rev-parse android-4.0.3_r1 >/dev/null 2>&1 | |
then | |
git log --oneline --no-merges android-4.0.3_r1..android-4.0.4_r1.1 | |
else | |
git log --oneline --no-merges android-4.0.4_r1.1 | |
fi | |
' | cat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Acer | |
SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0660", GROUP="plugdev" | |
# ASUS | |
SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0660", GROUP="plugdev" | |
# Dell | |
SUBSYSTEM=="usb", ATTR{idVendor}=="413c", MODE="0660", GROUP="plugdev" | |
# Foxconn |