You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
575 B
15 lines
575 B
#!/bin/bash
|
|
|
|
echo "Welcome to $(hostname -f)"
|
|
echo "$(date)"
|
|
echo "$(lsb_release -sd) $(uname -rm)"
|
|
upgrades=$(apt list -qq --upgradable 2> /dev/null | wc -l)
|
|
if [[ $upgrades -eq 0 ]]; then
|
|
echo "All packages are up to date."
|
|
elif [[ $upgrades -eq 1 ]]; then
|
|
echo "$upgrades package can be upgraded. Run 'apt list --upgradable' to see it."
|
|
elif [[ $upgrades -gt 1 ]]; then
|
|
echo "$upgrades packages can be upgraded. Run 'apt list --upgradable' to see them."
|
|
else
|
|
echo "Error getting list of upgradeable packages. Check your package system."
|
|
fi
|
|
|