forked from rapido-linux/rapido
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cut_usb_rbd.sh
executable file
·44 lines (41 loc) · 1.83 KB
/
cut_usb_rbd.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
#
# Copyright (C) SUSE LINUX GmbH 2016, all rights reserved.
#
# This library is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published
# by the Free Software Foundation; either version 2.1 of the License, or
# (at your option) version 3.
#
# This library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
# License for more details.
RAPIDO_DIR="$(realpath -e ${0%/*})"
. "${RAPIDO_DIR}/runtime.vars"
_rt_require_ceph
_rt_require_dracut_args
_rt_require_lib "libkeyutils.so.1"
dracut --install "tail blockdev ps rmdir resize dd vim grep find df sha256sum \
eject strace mkfs.vfat mountpoint \
mktemp touch sync cryptsetup dmsetup scp ssh \
/usr/lib/udev/rules.d/10-dm.rules \
/usr/lib/udev/rules.d/13-dm-disk.rules \
/usr/lib/udev/rules.d/95-dm-notify.rules \
$LIBS_INSTALL_LIST" \
--include "$CEPH_CONF" "/etc/ceph/ceph.conf" \
--include "$CEPH_KEYRING" "/etc/ceph/keyring" \
--include "$RBD_NAMER_BIN" "/usr/bin/ceph-rbdnamer" \
--include "$RBD_UDEV_RULES" "/usr/lib/udev/rules.d/50-rbd.rules" \
--include "$RAPIDO_DIR/usb_rbd_autorun.sh" "/.profile" \
--include "$RAPIDO_DIR/rapido.conf" "/rapido.conf" \
--include "$RAPIDO_DIR/vm_autorun.env" "/vm_autorun.env" \
--include "$RBD_USB_SRC/rbd-usb.sh" "/bin/rbd-usb.sh" \
--include "$RBD_USB_SRC/conf-fs.sh" "/bin/conf-fs.sh" \
--include "$RBD_USB_SRC/rbd-usb.env" "/usr/lib/rbd-usb.env" \
--include "$RBD_USB_SRC/rbd-usb.conf" "/etc/rbd-usb/rbd-usb.conf" \
--add-drivers "target_core_mod target_core_iblock usb_f_tcm \
usb_f_mass_storage zram dm-crypt" \
--modules "bash base network ifcfg" \
$DRACUT_EXTRA_ARGS \
$DRACUT_OUT