modules.d: get rid of "tr"
replace it with sed or str_replace or bash ${var/a/b}master
parent
92f26b6202
commit
99c7b70d1d
|
@ -31,7 +31,7 @@ install() {
|
|||
*) cmd=grep ;;
|
||||
esac
|
||||
|
||||
for INCL in $($cmd "^include " $MAP | cut -d' ' -f2 | tr -d '"'); do
|
||||
for INCL in $($cmd "^include " $MAP | while read a a b; do echo ${a/\"/}; done); do
|
||||
for FN in $(find ${kbddir}/keymaps -type f -name $INCL\*); do
|
||||
findkeymap $FN
|
||||
done
|
||||
|
|
|
@ -77,7 +77,7 @@ installkernel() {
|
|||
|
||||
install() {
|
||||
local _arch _i _dir
|
||||
dracut_install ip arping tr dhclient
|
||||
dracut_install ip arping dhclient sed
|
||||
dracut_install -o brctl
|
||||
inst_script "$moddir/ifup.sh" "/sbin/ifup"
|
||||
inst_script "$moddir/netroot.sh" "/sbin/netroot"
|
||||
|
|
|
@ -13,7 +13,7 @@ iface_for_remote_addr() {
|
|||
}
|
||||
|
||||
iface_for_mac() {
|
||||
local interface="" mac="$(echo $1 | tr '[:upper:]' '[:lower:]')"
|
||||
local interface="" mac="$(echo $1 | sed 'y/ABCDEF/abcdef/')"
|
||||
for interface in /sys/class/net/*; do
|
||||
if [ $(cat $interface/address) = "$mac" ]; then
|
||||
echo ${interface##*/}
|
||||
|
|
|
@ -32,8 +32,8 @@ parsebond() {
|
|||
case $# in
|
||||
0) bondname=bond0; bondslaves="eth0 eth1" ;;
|
||||
1) bondname=$1; bondslaves="eth0 eth1" ;;
|
||||
2) bondname=$1; bondslaves=$(echo $2|tr "," " ") ;;
|
||||
3) bondname=$1; bondslaves=$(echo $2|tr "," " "); bondoptions=$(echo $3|tr "," " ") ;;
|
||||
2) bondname=$1; bondslaves=$(str_replace "$2" "," " ") ;;
|
||||
3) bondname=$1; bondslaves=$(str_replace "$2" "," " "); bondoptions=$(str_replace "$3" "," " ") ;;
|
||||
*) die "bond= requires zero to four parameters" ;;
|
||||
esac
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ if getarg bond >/dev/null; then
|
|||
bondslaves="eth0 eth1"
|
||||
fi
|
||||
# Make it suitable for initscripts export
|
||||
bondoptions=$(echo $bondoptions|tr ";" ",")
|
||||
bondoptions=$(str_replace "$bondoptions" ";" ",")
|
||||
echo "bondname=$bondname" > /tmp/bond.info
|
||||
echo "bondslaves=\"$bondslaves\"" >> /tmp/bond.info
|
||||
echo "bondoptions=\"$bondoptions\"" >> /tmp/bond.info
|
||||
|
|
|
@ -29,7 +29,7 @@ parsebridge() {
|
|||
case $# in
|
||||
0) bridgename=br0; ethnames=$iface ;;
|
||||
1) die "bridge= requires two parameters" ;;
|
||||
2) bridgename=$1; ethnames=$(echo $2|tr "," " ") ;;
|
||||
2) bridgename=$1; ethnames=$(str_replace "$2" "," " ") ;;
|
||||
*) die "bridge= requires two parameters" ;;
|
||||
esac
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ parse_ifname_opts() {
|
|||
7)
|
||||
ifname_if=$1
|
||||
# udev requires MAC addresses to be lower case
|
||||
ifname_mac=`echo $2:$3:$4:$5:$6:$7 | tr '[:upper:]' '[:lower:]'`
|
||||
ifname_mac=$(echo $2:$3:$4:$5:$6:$7 | sed 'y/ABCDEF/abcdef/')
|
||||
;;
|
||||
*)
|
||||
die "Invalid arguments for ifname="
|
||||
|
|
|
@ -89,7 +89,7 @@ EOF
|
|||
for option in LAYER2 PORTNO; do
|
||||
[ -z "${!option}" ] && continue
|
||||
[ -n "$optstr" ] && optstr=${optstr}" "
|
||||
optstr=${optstr}$(echo ${option} | tr [[:upper:]] [[:lower:]])"="${!option}
|
||||
optstr=${optstr}$(echo ${option} | sed 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/')"="${!option}
|
||||
done
|
||||
# write single quotes since network.py removes double quotes but we need quotes
|
||||
echo "OPTIONS='$optstr'" >> $IFCFGFILE
|
||||
|
|
|
@ -24,7 +24,7 @@ install() {
|
|||
inst_hook pre-pivot 95 "$moddir/cms-write-ifcfg.sh"
|
||||
inst_script "$moddir/cmsifup.sh" /sbin/cmsifup
|
||||
dracut_install /etc/cmsfs-fuse/filetypes.conf /etc/udev/rules.d/99-fuse.rules /etc/fuse.conf \
|
||||
cmsfs-fuse fusermount ulockmgr_server bash tr insmod rmmod cat normalize_dasd_arg \
|
||||
cmsfs-fuse fusermount ulockmgr_server bash insmod rmmod cat normalize_dasd_arg sed \
|
||||
$(rpm -ql s390utils-base)
|
||||
|
||||
inst_libdir_file "gconv/*"
|
||||
|
|
|
@ -18,7 +18,7 @@ installkernel() {
|
|||
|
||||
install() {
|
||||
inst_hook cmdline 30 "$moddir/parse-dasd.sh"
|
||||
dracut_install tr dasdinfo dasdconf.sh normalize_dasd_arg
|
||||
dracut_install dasdinfo dasdconf.sh normalize_dasd_arg
|
||||
if [[ $hostonly ]]; then
|
||||
inst /etc/dasd.conf
|
||||
fi
|
||||
|
|
|
@ -22,7 +22,7 @@ installkernel() {
|
|||
|
||||
install() {
|
||||
inst_hook cmdline 30 "$moddir/parse-zfcp.sh"
|
||||
dracut_install tr zfcp_cio_free grep sed seq
|
||||
dracut_install zfcp_cio_free grep sed seq
|
||||
|
||||
inst_script /sbin/zfcpconf.sh
|
||||
inst_rules 56-zfcp.rules
|
||||
|
|
|
@ -30,7 +30,7 @@ if [ -f "$CONFIG" ]; then
|
|||
if [ ! -d /sys/bus/ccw/drivers/zfcp ]; then
|
||||
return
|
||||
fi
|
||||
tr "A-Z" "a-z" < $CONFIG| while read line; do
|
||||
sed 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/' < $CONFIG| while read line; do
|
||||
case $line in
|
||||
\#*) ;;
|
||||
*)
|
||||
|
|
Loading…
Reference in New Issue