mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 14:24:39 -07:00
* bin/reboot-required: add a --short option, which prints Yes or No
Signed-off-by: Dustin Kirkland <kirkland@canonical.com>
This commit is contained in:
parent
a1b9531880
commit
fafa9183a2
1 changed files with 6 additions and 2 deletions
|
@ -17,9 +17,13 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
flag="/var/run/reboot-required"
|
||||||
if [ "$1" = "--detail" ]; then
|
if [ "$1" = "--detail" ]; then
|
||||||
[ -e /var/run/reboot-required ] && printf "Yes" || printf "No"
|
ls -alF "$flag" 2>&1
|
||||||
|
exit 0
|
||||||
|
elif [ "$1" = "--short" ]; then
|
||||||
|
[ -e "$flag" ] && printf "Yes" || printf "No"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -e /var/run/reboot-required ] && printf "\005{=b bW}(@)\005{-} "
|
[ -e "$flag" ] && printf "\005{=b bW}(@)\005{-} "
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue