MSV FM

[email protected]: ~ $
Path : /lib/dracut/modules.d/95lunmask/
File Upload :
Current < : //lib/dracut/modules.d/95lunmask/module-setup.sh

#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

# called by dracut
cmdline() {
    get_lunmask() {
        local _dev=$1
        local _devpath=$(cd -P /sys/dev/block/$_dev ; echo $PWD)
        local _sdev _lun _rport _end_device _classdev _wwpn _sas_address

        [ "${_devpath#*/sd}" == "$_devpath" ] && return 1
        _sdev="${_devpath%%/block/*}"
        _lun="${_sdev##*:}"
        # Check for FibreChannel
        _rport="${_devpath##*/rport-}"
        if [ "$_rport" != "$_devpath" ] ; then
            _rport="${_rport%%/*}"
            _classdev="/sys/class/fc_remote_ports/rport-${_rport}"
            [ -d "$_classdev" ] || return 1
            _wwpn=$(cat ${_classdev}/port_name)
            echo "rd.lunmask=fc,${_wwpn},${_lun}"
            return 0
        fi
        # Check for SAS
        _end_device="${_devpath##*/end_device-}"
        if [ "$_end_device" != "$_devpath" ] ; then
            _end_device="${_end_device%%/*}"
            _classdev="/sys/class/sas_device/end_device-${_end_device}"
            [ -e "$_classdev" ] || return 1
            _sas_address=$(cat ${_classdev}/sas_address)
            echo "rd.lunmask=sas,${_sas_address},${_lun}"
            return 0
        fi
        return 1
    }
    [[ $hostonly ]] || [[ $mount_needs ]] && {
        for_each_host_dev_and_slaves_all get_lunmask
    } | sort | uniq
}

# called by dracut
check() {
    [[ $hostonly ]] || [[ $mount_needs ]] && {
        [ -w /sys/module/scsi_mod/parameters/scan ] || return 255
        scan_type=$(cat /sys/module/scsi_mod/parameters/scan)
        [ "$scan_type" = "manual" ] && return 0
        return 255
    }
    return 0
}

# called by dracut
depends() {
    return 0
}

# called by dracut
install() {
    inst_script "$moddir/fc_transport_scan_lun.sh" /usr/lib/udev/fc_transport_scan_lun.sh
    inst_script "$moddir/sas_transport_scan_lun.sh" /usr/lib/udev/sas_transport_scan_lun.sh
    inst_hook cmdline 30 "$moddir/parse-lunmask.sh"
    if [[ $hostonly_cmdline == "yes" ]] ; then
        local _lunmask

        for _lunmask in $(cmdline) ; do
            printf "%s\n" "$_lunmask" >> "${initdir}/etc/cmdline.d/95lunmask.conf"
        done
    fi
}
Bethany
Bethany
0%

THE FINEST HOTEL NEAR LAKE KIVU

The Perfect Base For You

Required fields are followed by *





EC1A68011

About Us

Delicious Interior With The Pinch Of Everything

Bethany Investment group is Presbyterian church in Rwanda(EPR) company that manage Hotel and Guest house in Karongi (Bethany Hotel), ISANO branch in GIKONDO(Kigali), Kiyovu branch(Kigali), AMIZERO branch(Nyagatare-East) and Gisenyi Branch(Rubavu).

Accomodation

Get a Comfortable Room
Feel The Comfort

Get a comfortable room and feel our hotel’s comfort. Bethany Hotel features a variety of fully furnished rooms with extra space, Executive rooms, Deluxe rooms with a beautiful lake view and garden space, Deluxe rooms, comfort rooms, family rooms and standard rooms at your service.

Standard Single

Services

We Provide Top Class Facility
Especially For You

Beach BBQ Party

Kick back on the beach& and enjoy our berbecue from our masterchef

Breakfast

Kick back at our hotels& enjoy our breakfast from our masterchef

Conference Hall

Kick back at our hotels& enjoy our conference halls from all bethany branches

Enjoy with your partner

Honeymoon Package

80%

Get In Touch

Don’t Miss Any Update

    +

    Search your Room

    Required fields are followed by *