]> git.proxmox.com Git - ceph.git/blame - ceph/src/ceph-run
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / ceph-run
CommitLineData
7c673cae
FG
1#!/bin/sh
2
3sleep=5
1e59de90
TL
4no_restart=0
5
6if [ $1 == "--no-restart" ]; then
7 no_restart=1
8 shift
9fi
7c673cae
FG
10
11while [ true ]; do
12 "$@"
13 exit_code=$?
14
1e59de90 15 if [ $exit_code -gt 128 ] && [ $no_restart -eq 0 ]; then
7c673cae
FG
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
27done