File: parse-dasd-mod.sh

package info (click to toggle)
dracut 044%2B241-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 3,248 kB
  • ctags: 1,363
  • sloc: sh: 20,387; ansic: 3,666; makefile: 273; python: 165; perl: 41; lisp: 2
file content (18 lines) | stat: -rwxr-xr-x 393 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh
mod_args=""

for dasd_arg in $(getargs rd.dasd= -d rd_DASD= DASD=); do
    mod_args="$mod_args,$dasd_arg"
done

mod_args="${mod_args#*,}"

if [ -n "$mod_args" ]; then
    [ -d /etc/modprobe.d ] || mkdir -m 0755 -p /etc/modprobe.d
    echo "options dasd_mod dasd=$mod_args" >> /etc/modprobe.d/dasd_mod.conf
fi

unset dasd_arg
if [ -x /sbin/dasd_cio_free ] ; then
    dasd_cio_free
fi