iankelling.org
/
git
/
distro-setup
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
minor bug fix
[distro-setup]
/
system-status
diff --git
a/system-status
b/system-status
index c58d9cea7f6eb3efceae04e08d85c1ce386bfa22..b3c22e4ea8126f1a24330b039aceef3803ed1d03 100755
(executable)
--- a/
system-status
+++ b/
system-status
@@
-45,17
+45,30
@@
write-status() {
chars+=("MAILPING!")
fi
chars+=("MAILPING!")
fi
- qlen=$(/usr/sbin/exiqgrep -o 60 -c -b | awk '{print $1}')
+ if ! qlen=$(/usr/sbin/exiqgrep -o 60 -c -b | awk '{print $1}'); then
+ # early in install process, we dont have permission yet for exiqgrep
+ qlen=$(sudo /usr/sbin/exiqgrep -o 60 -c -b | awk '{print $1}')
+ fi
if ((qlen)); then
chars+=("q $qlen")
fi
if ((qlen)); then
chars+=("q $qlen")
fi
+ begin=false
cd /b/ds
if ! make -q ~/.local/distro-begin || [[ $(<~/.local/distro-begin) != 0 ]]; then
cd /b/ds
if ! make -q ~/.local/distro-begin || [[ $(<~/.local/distro-begin) != 0 ]]; then
- chars+=("DISTRO-BEGIN!")
+ begin=true
fi
fi
+ end=false
if ! make -q ~/.local/distro-end || [[ $(<~/.local/distro-end) != 0 ]]; then
if ! make -q ~/.local/distro-end || [[ $(<~/.local/distro-end) != 0 ]]; then
+ end=true
+ fi
+
+ if $begin && $end; then
+ chars+=("DISTRO!")
+ elif $begin; then
+ chars+=("DISTRO-BEGIN!")
+ elif $end; then
chars+=("DISTRO-END!")
fi
chars+=("DISTRO-END!")
fi
@@
-90,6
+103,10
@@
write-status() {
for d in /a/bin/distro-setup /p/c; do
cd $d
for d in /a/bin/distro-setup /p/c; do
cd $d
+ if [[ ! -e .git ]]; then
+ # some hosts i dont push all of /p/c
+ continue
+ fi
untracked=$(git ls-files -o --exclude-standard)
if [[ $untracked && $(find $untracked -mmin $fminplus -type f -print -quit) ]]; then
v conflink: untracked in $d
untracked=$(git ls-files -o --exclude-standard)
if [[ $untracked && $(find $untracked -mmin $fminplus -type f -print -quit) ]]; then
v conflink: untracked in $d
@@
-157,7
+174,7
@@
write-status() {
fi
done
if (( maxtime < now - 60*60 )); then
fi
done
if (( maxtime < now - 60*60 )); then
- chars+=("OLD-SNAP
SHOT
!")
+ chars+=("OLD-SNAP!")
snapshotmsg="/o snapshot older than 1 hour"
fi
lo -1 old-snapshot $snapshotmsg
snapshotmsg="/o snapshot older than 1 hour"
fi
lo -1 old-snapshot $snapshotmsg