]> git.proxmox.com Git - ceph.git/blob - ceph/src/ceph-run
bump version to 18.2.4-pve3
[ceph.git] / ceph / src / ceph-run
1 #!/bin/sh
2
3 sleep=5
4 no_restart=0
5
6 if [ $1 == "--no-restart" ]; then
7 no_restart=1
8 shift
9 fi
10
11 while [ true ]; do
12 "$@"
13 exit_code=$?
14
15 if [ $exit_code -gt 128 ] && [ $no_restart -eq 0 ]; then
16 case $(($exit_code-128)) in
17 3 | 4 | 5 | 6 | 8 | 11)
18 ;;
19 *)
20 exit;
21 esac
22 echo ceph-run: $1 dumped core, restarting in $sleep seconds...
23 sleep $sleep
24 else
25 exit
26 fi
27 done