|
|
|
@ -72,7 +72,7 @@ update() { |
|
|
|
FQDN=$(hostname -f) |
|
|
|
FQDN=$(hostname -f) |
|
|
|
OSID=$(cat /etc/*-release 2>/dev/null | awk -F'=' '/^ID=/ { print $2; count++ } END { if (!count) print "Unknown" }') |
|
|
|
OSID=$(cat /etc/*-release 2>/dev/null | awk -F'=' '/^ID=/ { print $2; count++ } END { if (!count) print "Unknown" }') |
|
|
|
KERNEL=$(uname -r) |
|
|
|
KERNEL=$(uname -r) |
|
|
|
EXTERNAL=$(dig TXT +short o-o.myaddr.l.google.com @ns1.google.com | tr -d '"') |
|
|
|
EXTERNAL=$(dig TXT +time=3 +tries=2 +short o-o.myaddr.l.google.com @ns1.google.com | tr -d '"') |
|
|
|
|
|
|
|
|
|
|
|
# Get number of updates awaiting |
|
|
|
# Get number of updates awaiting |
|
|
|
test -f "$CACHEPATH/pkg_count" || PKG_REFRESH=1 |
|
|
|
test -f "$CACHEPATH/pkg_count" || PKG_REFRESH=1 |
|
|
|
@ -92,7 +92,6 @@ update() { |
|
|
|
echo $PKG_NU > "$CACHEPATH/pkg_count" |
|
|
|
echo $PKG_NU > "$CACHEPATH/pkg_count" |
|
|
|
fi |
|
|
|
fi |
|
|
|
PKG_NU=$(cat $CACHEPATH/pkg_count) |
|
|
|
PKG_NU=$(cat $CACHEPATH/pkg_count) |
|
|
|
|
|
|
|
|
|
|
|
# Test if /etc/motd writable and run motd generator if so |
|
|
|
# Test if /etc/motd writable and run motd generator if so |
|
|
|
test -w $MOTD && motdGen |
|
|
|
test -w $MOTD && motdGen |
|
|
|
} |
|
|
|
} |
|
|
|
|