update_slackpkg_packages.sh 371 B

1234567891011121314151617
  1. #!/bin/bash
  2. # fail if any commands fails
  3. set -e
  4. # debug log
  5. #set -x
  6. # update and upgrade system
  7. slackpkg update gpg
  8. slackpkg update
  9. slackpkg upgrade-all
  10. read -rp "Enter kernel version if updated (leave empty if not updated): " kernel_version
  11. if [[ -z $kernel_version ]]; then
  12. #mkinitrd -c -k "$kernel_version" -f ext2 -r /dev/sda1 -o /boot/initrd.gz
  13. mkinitrd -i
  14. fi