cut_fstests: add missing dependencies
[ddiss/rapido.git] / usb_rbd_autorun.sh
1 #!/bin/bash
2 #
3 # Copyright (C) SUSE LINUX GmbH 2016, all rights reserved.
4 #
5 # This library is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU Lesser General Public License as published
7 # by the Free Software Foundation; either version 2.1 of the License, or
8 # (at your option) version 3.
9 #
10 # This library is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 # or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
13 # License for more details.
14
15 if [ ! -f /vm_autorun.env ]; then
16         echo "Error: autorun scripts must be run from within an initramfs VM"
17         exit 1
18 fi
19
20 . /vm_autorun.env
21
22 set -x
23
24 #### ddiss - start udevd, so that the rbdnamer hook is invoked
25 ps -eo args | grep -v grep | grep /usr/lib/systemd/systemd-udevd \
26         || /usr/lib/systemd/systemd-udevd --daemon
27
28 # ensure that conf FS is exposed before RBD mapping
29 touch /usr/lib/rbd-usb-run-conf.flag
30
31 # in background so that the wait-for-eject loop doesn't block the cmdline
32 /bin/conf-fs.sh &
33
34 set +x