]>
git.madduck.net Git - code/molly-guard.git/commitdiff
madduck's git repository
Every one of the projects in this repository is available at the canonical
URL git://git.madduck.net/madduck/pub/<projectpath> — see
each project's metadata for the exact URL.
All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@ git. madduck. net .
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
SSH access, as well as push access can be individually
arranged .
If you use my repositories frequently, consider adding the following
snippet to ~/.gitconfig and using the third clone URL listed for each
project:
[url "git://git.madduck.net/madduck/"]
insteadOf = madduck:
summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (parent:
9b29802 )
# we've been asked to always protect this host
if [ ${ALWAYS_QUERY_HOSTNAME:-0} -eq 1 ]; then
# we've been asked to always protect this host
if [ ${ALWAYS_QUERY_HOSTNAME:-0} -eq 1 ]; then
- echo "I: $ME: $MOLLYGUARD_CMD is always molly-guarded on this system."
+ echo "I: $ME: $MOLLYGUARD_CMD is always molly-guarded on this system." >&2
else
# only run if we are being called over SSH, that is if the current terminal
# was created by sshd.
else
# only run if we are being called over SSH, that is if the current terminal
# was created by sshd.
if ! pgrep -f "^sshd.+${PTS#/dev/}[[:space:]]*$" >/dev/null \
&& [ -z "${SSH_CONNECTION:-}" ]; then
if [ $PRETEND_SSH -eq 1 ]; then
if ! pgrep -f "^sshd.+${PTS#/dev/}[[:space:]]*$" >/dev/null \
&& [ -z "${SSH_CONNECTION:-}" ]; then
if [ $PRETEND_SSH -eq 1 ]; then
- echo "I: $ME: this is not an SSH session, but --pretend-ssh was given..."
+ echo "I: $ME: this is not an SSH session, but --pretend-ssh was given..." >&2
- echo "W: $ME: SSH session detected!"
+ echo "W: $ME: SSH session detected!" >&2
- echo "Good thing I asked; I won't $MOLLYGUARD_CMD $HOSTNAME ..."
+ echo "Good thing I asked; I won't $MOLLYGUARD_CMD $HOSTNAME ..." >&2
}
if [ $DO_NOTHING -eq 1 ]; then
}
if [ $DO_NOTHING -eq 1 ]; then
- echo "I: demo mode; $ME will not do anything due to --molly-guard-do-nothing."
+ echo "I: demo mode; $ME will not do anything due to --molly-guard-do-nothing." >&2
fi
# pass through certain commands
case "$CMD $CMDARGS" in
(*shutdown\ *-c*)
# allow canceling shutdowns
fi
# pass through certain commands
case "$CMD $CMDARGS" in
(*shutdown\ *-c*)
# allow canceling shutdowns
- echo "I: executing $CMD $CMDARGS regardless of check results."
+ echo "I: executing $CMD $CMDARGS regardless of check results." >&2
ret=0
eval $script $SCRIPTARGS || ret=$?
if [ $ret -ne 0 ]; then
ret=0
eval $script $SCRIPTARGS || ret=$?
if [ $ret -ne 0 ]; then
- echo "W: aborting $CMD due to ${script##*/} exiting with code $ret."
+ echo "W: aborting $CMD due to ${script##*/} exiting with code $ret." >&2