slackware-current/source/installer/sources/initrd/dev/makedevs.sh

261 lines
6.9 KiB
Bash
Raw Normal View History

Wed Jun 6 22:19:01 UTC 2018 a/bash-4.4.023-x86_64-1.txz: Upgraded. a/kernel-firmware-20180604_1fa9ce3-noarch-1.txz: Upgraded. a/kernel-generic-4.14.48-x86_64-1.txz: Upgraded. a/kernel-huge-4.14.48-x86_64-1.txz: Upgraded. a/kernel-modules-4.14.48-x86_64-1.txz: Upgraded. ap/cups-2.2.8-x86_64-1.txz: Upgraded. ap/ghostscript-fonts-std-8.11-noarch-3.txz: Rebuilt. Rebuilt this and many other font packages or packages with build scripts that call mkfontdir or mkfontscale to suppress any error messages caused by collisions if another package installation is writing files to the same font directories when those utilities are run. In that case, the other package will also be running mkfontdir/mkfontscale after the files are installed, so any issues will be cleaned up then. Last one out turn off the lights, so to speak. ap/sqlite-3.24.0-x86_64-1.txz: Upgraded. ap/terminus-font-4.40-noarch-3.txz: Rebuilt. d/kernel-headers-4.14.48-x86-1.txz: Upgraded. d/rust-1.26.2-x86_64-1.txz: Upgraded. k/kernel-source-4.14.48-noarch-1.txz: Upgraded. l/elfutils-0.171-x86_64-1.txz: Upgraded. l/harfbuzz-1.7.7-x86_64-1.txz: Upgraded. l/mozilla-nss-3.37.3-x86_64-1.txz: Upgraded. l/readline-7.0.005-x86_64-1.txz: Upgraded. x/dejavu-fonts-ttf-2.37-noarch-4.txz: Rebuilt. x/font-adobe-100dpi-1.0.3-noarch-3.txz: Rebuilt. x/font-adobe-75dpi-1.0.3-noarch-3.txz: Rebuilt. x/font-adobe-utopia-100dpi-1.0.4-noarch-3.txz: Rebuilt. x/font-adobe-utopia-75dpi-1.0.4-noarch-3.txz: Rebuilt. x/font-adobe-utopia-type1-1.0.4-noarch-3.txz: Rebuilt. x/font-arabic-misc-1.0.3-noarch-3.txz: Rebuilt. x/font-bh-100dpi-1.0.3-noarch-3.txz: Rebuilt. x/font-bh-75dpi-1.0.3-noarch-3.txz: Rebuilt. x/font-bh-lucidatypewriter-100dpi-1.0.3-noarch-3.txz: Rebuilt. x/font-bh-lucidatypewriter-75dpi-1.0.3-noarch-3.txz: Rebuilt. x/font-bh-ttf-1.0.3-noarch-3.txz: Rebuilt. x/font-bh-type1-1.0.3-noarch-3.txz: Rebuilt. x/font-bitstream-100dpi-1.0.3-noarch-3.txz: Rebuilt. x/font-bitstream-75dpi-1.0.3-noarch-3.txz: Rebuilt. x/font-bitstream-speedo-1.0.2-noarch-3.txz: Rebuilt. x/font-bitstream-type1-1.0.3-noarch-3.txz: Rebuilt. x/font-cronyx-cyrillic-1.0.3-noarch-3.txz: Rebuilt. x/font-cursor-misc-1.0.3-noarch-3.txz: Rebuilt. x/font-daewoo-misc-1.0.3-noarch-3.txz: Rebuilt. x/font-dec-misc-1.0.3-noarch-3.txz: Rebuilt. x/font-ibm-type1-1.0.3-noarch-3.txz: Rebuilt. x/font-isas-misc-1.0.3-noarch-3.txz: Rebuilt. x/font-jis-misc-1.0.3-noarch-3.txz: Rebuilt. x/font-micro-misc-1.0.3-noarch-3.txz: Rebuilt. x/font-misc-cyrillic-1.0.3-noarch-3.txz: Rebuilt. x/font-misc-ethiopic-1.0.3-noarch-3.txz: Rebuilt. x/font-misc-meltho-1.0.3-noarch-3.txz: Rebuilt. x/font-misc-misc-1.1.2-noarch-3.txz: Rebuilt. x/font-mutt-misc-1.0.3-noarch-3.txz: Rebuilt. x/font-schumacher-misc-1.1.2-noarch-3.txz: Rebuilt. x/font-screen-cyrillic-1.0.4-noarch-3.txz: Rebuilt. x/font-sony-misc-1.0.3-noarch-3.txz: Rebuilt. x/font-sun-misc-1.0.3-noarch-3.txz: Rebuilt. x/font-winitzki-cyrillic-1.0.3-noarch-3.txz: Rebuilt. x/font-xfree86-type1-1.0.4-noarch-3.txz: Rebuilt. x/liberation-fonts-ttf-2.00.1-noarch-3.txz: Rebuilt. x/libinput-1.11.0-x86_64-1.txz: Upgraded. x/sazanami-fonts-ttf-20040629-noarch-3.txz: Rebuilt. x/sinhala_lklug-font-ttf-20060929-noarch-3.txz: Rebuilt. x/tibmachuni-font-ttf-1.901b-noarch-3.txz: Rebuilt. x/ttf-indic-fonts-0.5.14-noarch-3.txz: Rebuilt. x/ttf-tlwg-0.6.4-noarch-3.txz: Rebuilt. x/urw-core35-fonts-otf-20170801_91edd6e_git-noarch-2.txz: Rebuilt. x/wqy-zenhei-font-ttf-0.8.38_1-noarch-6.txz: Rebuilt. xap/mozilla-firefox-60.0.2-x86_64-1.txz: Upgraded. This release contains security fixes and improvements. For more information, see: https://www.mozilla.org/security/known-vulnerabilities/firefox.html (* Security fix *) xap/x3270-3.3.12ga7-x86_64-5.txz: Rebuilt. isolinux/initrd.img: Rebuilt. kernels/*: Upgraded. usb-and-pxe-installers/usbboot.img: Rebuilt.
2018-06-07 00:19:01 +02:00
#!/bin/sh
# This script makes /dev entries for hard drives listed in /proc/partitions.
# Written by Patrick Volkerding, licensed under the GPL (any version).
# Copyright 2001, 2002 Slackware Linux, Inc., Concord, CA
# Many thanks to Vincent Rivellino for contributing the patches to support
# Mylex and Compaq RAID controllers.
# Devfs enabled kernels don't use the old familiar device names in
# /proc/partitions, so we need to be able to figure them out on the
# basis of only the major/minor numbers. This will require some
# maintainance for a while, but we expect to require devfs soon enough,
# and that will help generalize the installation to new types of
# devices without requiring fixes from us.
# Also, we're not yet ready to install with devfs _mounted_, so don't
# try that. :)
# Main loop:
# First, determine if we are using old or new device names. The old format
# will never contain a '/' (Well, some RAID controllers could have them,
# but luckily we can handle those in the same way)
# Make a device:
makedev() {
if [ ! -b $1 ]; then
mknod $1 b $2 $3
chown root.disk $1
chmod 640 $1
fi
}
# Make ide device
# makeide major minor hd1 hd2 (2 base devs for major)
make_ide() {
# Handle base devices:
if [ "$2" = "0" ]; then
makedev /dev/$3 $1 $2
return 0
elif [ "$2" = "64" ]; then
makedev /dev/$4 $1 $2
return 0
fi
# Must be a partition:
if [ "`expr $2 / 64`" = "0" ]; then
DEV=$3
NUM=$2
else
DEV=$4
NUM=`expr $2 - 64`
fi
makedev /dev/$DEV$NUM $1 $2
}
# Make SCSI device
make_scsi() {
# find drive # 0 - 15
DRV=`expr $1 / 16`
NUM=`expr $1 % 16`
if [ "$NUM" = "0" ]; then
NUM=""
fi
if [ "$DRV" = "0" ]; then
makedev /dev/sda$NUM 8 $1
elif [ "$DRV" = "1" ]; then
makedev /dev/sdb$NUM 8 $1
elif [ "$DRV" = "2" ]; then
makedev /dev/sdc$NUM 8 $1
elif [ "$DRV" = "3" ]; then
makedev /dev/sdd$NUM 8 $1
elif [ "$DRV" = "4" ]; then
makedev /dev/sde$NUM 8 $1
elif [ "$DRV" = "5" ]; then
makedev /dev/sdf$NUM 8 $1
elif [ "$DRV" = "6" ]; then
makedev /dev/sdg$NUM 8 $1
elif [ "$DRV" = "7" ]; then
makedev /dev/sdh$NUM 8 $1
elif [ "$DRV" = "8" ]; then
makedev /dev/sdi$NUM 8 $1
elif [ "$DRV" = "9" ]; then
makedev /dev/sdj$NUM 8 $1
elif [ "$DRV" = "10" ]; then
makedev /dev/sdk$NUM 8 $1
elif [ "$DRV" = "11" ]; then
makedev /dev/sdl$NUM 8 $1
elif [ "$DRV" = "12" ]; then
makedev /dev/sdm$NUM 8 $1
elif [ "$DRV" = "13" ]; then
makedev /dev/sdn$NUM 8 $1
elif [ "$DRV" = "14" ]; then
makedev /dev/sdo$NUM 8 $1
elif [ "$DRV" = "15" ]; then
makedev /dev/sdp$NUM 8 $1
fi
}
# Make Mylex RAID device
make_rd() {
if [ ! -d /dev/rd ]; then
mkdir /dev/rd
fi
# find drive
DRV=`expr $3 / 8`
NUM="p`expr $3 % 8`"
if [ "$NUM" = "p0" ]; then
NUM=""
fi
makedev /dev/rd/c$1d$DRV$NUM $2 $3
}
# Make Cpq SMART/2 RAID device
make_ida() {
if [ ! -d /dev/ida ]; then
mkdir /dev/ida
fi
# find drive
DRV=`expr $3 / 16`
NUM="p`expr $3 % 16`"
if [ "$NUM" = "p0" ]; then
NUM=""
fi
makedev /dev/ida/c$1d$DRV$NUM $2 $3
}
# Make Compaq Next Generation RAID device
make_cciss() {
if [ ! -d /dev/cciss ]; then
mkdir /dev/cciss
fi
# find drive
DRV=`expr $3 / 16`
NUM="p`expr $3 % 16`"
if [ "$NUM" = "p0" ]; then
NUM=""
fi
makedev /dev/cciss/c$1d$DRV$NUM $2 $3
}
# Make ATA RAID device
make_ataraid() {
if [ ! -d /dev/ataraid ]; then
mkdir /dev/ataraid
fi
# find drive
DRV=`expr $2 / 16`
NUM=`expr $2 % 16`
if [ "$NUM" = "0" ]; then
makedev /dev/ataraid/d$DRV $1 $2
else
makedev /dev/ataraid/d${DRV}p$NUM $1 $2
fi
}
# Make AMI HyperRAID device:
make_amiraid() {
if [ ! -d /dev/amiraid ]; then
mkdir /dev/amiraid
fi
# find drive
DRV=`expr $2 / 16`
NUM=`expr $2 % 16`
if [ "$NUM" = "0" ]; then
makedev /dev/amiraid/ar$DRV $1 $2
else
makedev /dev/amiraid/ar${DRV}p$NUM $1 $2
fi
}
if cat /proc/partitions | grep / 1> /dev/null 2> /dev/null ; then # new
cat /proc/partitions | grep / | while read line ; do
SMASHED_LINE=$line
MAJOR=`echo $SMASHED_LINE | cut -f 1 -d ' '`
MINOR=`echo $SMASHED_LINE | cut -f 2 -d ' '`
if [ "$MAJOR" = "3" ]; then
make_ide $MAJOR $MINOR hda hdb
elif [ "$MAJOR" = "8" ]; then
make_scsi $MINOR
elif [ "$MAJOR" = "22" ]; then
make_ide $MAJOR $MINOR hdc hdd
elif [ "$MAJOR" = "33" ]; then
make_ide $MAJOR $MINOR hde hdf
elif [ "$MAJOR" = "34" ]; then
make_ide $MAJOR $MINOR hdg hdh
elif [ "$MAJOR" = "48" ]; then
make_rd 0 $MAJOR $MINOR
elif [ "$MAJOR" = "49" ]; then
make_rd 1 $MAJOR $MINOR
elif [ "$MAJOR" = "50" ]; then
make_rd 2 $MAJOR $MINOR
elif [ "$MAJOR" = "51" ]; then
make_rd 3 $MAJOR $MINOR
elif [ "$MAJOR" = "52" ]; then
make_rd 4 $MAJOR $MINOR
elif [ "$MAJOR" = "53" ]; then
make_rd 5 $MAJOR $MINOR
elif [ "$MAJOR" = "54" ]; then
make_rd 6 $MAJOR $MINOR
elif [ "$MAJOR" = "55" ]; then
make_rd 7 $MAJOR $MINOR
elif [ "$MAJOR" = "56" ]; then
make_ide $MAJOR $MINOR hdi hdj
elif [ "$MAJOR" = "57" ]; then
make_ide $MAJOR $MINOR hdk hdl
elif [ "$MAJOR" = "72" ]; then
make_ida 0 $MAJOR $MINOR
elif [ "$MAJOR" = "73" ]; then
make_ida 1 $MAJOR $MINOR
elif [ "$MAJOR" = "74" ]; then
make_ida 2 $MAJOR $MINOR
elif [ "$MAJOR" = "75" ]; then
make_ida 3 $MAJOR $MINOR
elif [ "$MAJOR" = "76" ]; then
make_ida 4 $MAJOR $MINOR
elif [ "$MAJOR" = "77" ]; then
make_ida 5 $MAJOR $MINOR
elif [ "$MAJOR" = "78" ]; then
make_ida 6 $MAJOR $MINOR
elif [ "$MAJOR" = "79" ]; then
make_ida 7 $MAJOR $MINOR
elif [ "$MAJOR" = "88" ]; then
make_ide $MAJOR $MINOR hdm hdn
elif [ "$MAJOR" = "89" ]; then
make_ide $MAJOR $MINOR hdo hdp
elif [ "$MAJOR" = "90" ]; then
make_ide $MAJOR $MINOR hdq hdr
elif [ "$MAJOR" = "91" ]; then
make_ide $MAJOR $MINOR hds hdt
elif [ "$MAJOR" = "101" ]; then
make_amiraid $MAJOR $MINOR
elif [ "$MAJOR" = "104" ]; then
make_cciss 0 $MAJOR $MINOR
elif [ "$MAJOR" = "105" ]; then
make_cciss 1 $MAJOR $MINOR
elif [ "$MAJOR" = "106" ]; then
make_cciss 2 $MAJOR $MINOR
elif [ "$MAJOR" = "107" ]; then
make_cciss 3 $MAJOR $MINOR
elif [ "$MAJOR" = "108" ]; then
make_cciss 4 $MAJOR $MINOR
elif [ "$MAJOR" = "109" ]; then
make_cciss 5 $MAJOR $MINOR
elif [ "$MAJOR" = "110" ]; then
make_cciss 6 $MAJOR $MINOR
elif [ "$MAJOR" = "111" ]; then
make_cciss 7 $MAJOR $MINOR
elif [ "$MAJOR" = "114" ]; then
make_ataraid $MAJOR $MINOR
fi
done
else # old format
cat /proc/partitions | grep d | while read line ; do
SMASHED_LINE=$line
MAJOR=`echo $SMASHED_LINE | cut -f 1 -d ' '`
MINOR=`echo $SMASHED_LINE | cut -f 2 -d ' '`
DEVNAME=`echo $SMASHED_LINE | cut -f 4 -d ' '`
makedev /dev/$DEVNAME $MAJOR $MINOR
done
fi