github.com/coreos/rocket@v1.30.1-0.20200224141603-171c416fac02/scripts/pkg/before-remove (about)

     1  if [ -f /usr/bin/rkt ]; then
     2      if [ -n "$(/usr/bin/rkt list --no-legend | awk '{print $4}' | grep running)" ]; then
     3          printf "rkt/before-remove error: detected running containers.\n"
     4          exit 1
     5      fi
     6      /usr/bin/rkt gc --grace-period=0s
     7      if [ -n "$(grep "/var/lib/rkt/pods/run/" /proc/mounts)" ]; then
     8          printf "rkt/before-remove error: detected active mounts in [/var/lib/rkt].\n"
     9          exit 1
    10      fi
    11  fi