From: Chris Koeritz Date: Fri, 15 Oct 2021 05:44:01 +0000 (-0400) Subject: return of larch and an is_reboot_needed query X-Git-Tag: 2.140.131^2~38 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=ad815024bfa7d47af09bfb983dfe7fa112ac2c59;p=feisty_meow.git return of larch and an is_reboot_needed query larch is list_arch, in more accessible and funnily nostalgic form. i.e. number something or other, the larch. the larch. --- diff --git a/scripts/core/common.alias b/scripts/core/common.alias index 7dc95071..9c24dfc2 100644 --- a/scripts/core/common.alias +++ b/scripts/core/common.alias @@ -68,6 +68,7 @@ define_yeti_alias get_feisty='rpuffer $FEISTY_MEOW_APEX; regenerate' define_yeti_alias halt='sudo shutdown -h now' define_yeti_alias i=inventory define_yeti_alias l='perl $FEISTY_MEOW_SCRIPTS/files/summing_dir.pl' +define_yeti_alias larch='list_arch' define_yeti_alias ll='ls_dot_add=-a perl $FEISTY_MEOW_SCRIPTS/files/summing_dir.pl' define_yeti_alias ls='ls -HhFC $color_add' define_yeti_alias lsd='ls -hl' diff --git a/scripts/system/is_reboot_needed.sh b/scripts/system/is_reboot_needed.sh new file mode 100644 index 00000000..26d65a78 --- /dev/null +++ b/scripts/system/is_reboot_needed.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# returns an error value if reboot IS required due to some recent +# updates. otherwise returns a normal zero exit value indicating +# that things are peachy. + +if [ -f /var/run/reboot-required ]; then + echo 'reboot required' + exit 1 +fi +exit 0 + +#hmmm: add other OS versions, e.g. +# redhat/centos: $ needs-restarting -r ; echo $? +# shows if needs to be rebooted and returns an error if does need reboot +#