diff options
Diffstat (limited to 'source/installer/sources/initrd/etc/rc.d')
-rwxr-xr-x | source/installer/sources/initrd/etc/rc.d/rc.S | 51 | ||||
-rwxr-xr-x | source/installer/sources/initrd/etc/rc.d/rc.pcmcia | 2 |
2 files changed, 41 insertions, 12 deletions
diff --git a/source/installer/sources/initrd/etc/rc.d/rc.S b/source/installer/sources/initrd/etc/rc.d/rc.S index fcd5fea2c..0e69d7349 100755 --- a/source/installer/sources/initrd/etc/rc.d/rc.S +++ b/source/installer/sources/initrd/etc/rc.d/rc.S @@ -1,18 +1,29 @@ #!/bin/sh # rc.S: Basic system initialization. -# Any /etc/mtab that exists here is old, so we start with a new one: -/bin/rm -f /etc/mtab{,~,.tmp} && /bin/touch /etc/mtab - -# Add (fake) entry for / to /etc/mtab: -/sbin/mount -f -w /dev/initramfs / -t tmpfs 1> /dev/null - # Mount /proc: /sbin/mount -v proc /proc -t proc 1> /dev/null # Mount sysfs next: /sbin/mount -v sysfs /sys -t sysfs 1> /dev/null +# The efivarfs filesystem is used for reading and writing EFI variables, such +# as the boot menu entries. By default efivarfs will be mounted read-write on +# the /sys/firmware/efi/efivars directory. +if [ -d /sys/firmware/efi/efivars ]; then + mount -o rw -t efivarfs none /sys/firmware/efi/efivars +fi + +# Set a root password for the Slackware Installer if set as a Kernel cmdline: +# This is intended for network installations where otherwise the root password +# would be unset. +# Note: this does not configure the OS root password. +# Passwords should be set as follows within the Kernel cmdline: +# instrootpw=yourpassword +if grep -qoP 'instrootpw=\K\S+' /proc/cmdline ; then + /bin/echo "root:$( grep -oP 'instrootpw=\K\S+' /proc/cmdline )" | /bin/busybox chpasswd +fi + # Activate swap: /sbin/swapon -a 1> /dev/null @@ -171,8 +182,14 @@ rm -f /tmp/foo echo "Activating LVM volumes:" vgchange -ay -if [ -x /etc/rc.d/rc.font ]; then - /bin/sh /etc/rc.d/rc.font +# In testing here the results of running rc.font with HiDPI screens has been +# rather unpredicable, sometimes resulting in an unreadably small font rather +# than increasing the size. Let's skip it unless RCFONT is passed as a kernel +# command-line flag: +if cat /proc/cmdline | grep -wq RCFONT ; then + if [ -x /etc/rc.d/rc.font ]; then + /bin/sh /etc/rc.d/rc.font + fi fi # Don't automatically blank the screen, or it will go black during the install @@ -233,11 +250,23 @@ if ! cat /proc/cmdline | grep -q 'kbd=' 2> /dev/null ; then else for ARG in `cat /proc/cmdline` ; do if [ "`echo $ARG | cut -f1 -d=`" = "kbd" ]; then - BMAP="`echo $ARG | cut -f2 -d=`.bmap" + # A keymap was specified on the kernel command line such as: kbd=azerty + MAPSELECT="$(echo $ARG | cut -f2 -d=)" + # If it ends in .gz, strip that off: + if [ "$(echo $MAPSELECT | rev | cut -f 1 -d . | rev)" = "gz" ]; then + MAPSELECT=$(basename $MAPSELECT .gz) + fi + # If it doesn't end in .map, add that: + if [ ! "$(echo $MAPSELECT | rev | cut -f 1 -d . | rev)" = "map" ]; then + MAPSELECT=${MAPSELECT}.map + fi + # Load the keymap: + loadkeys -q $MAPSELECT + # Let the setup script know about this: + echo $MAPSELECT > /tmp/Pkeymap + unset MAPSELECT fi done - tar xzOf /etc/keymaps.tar.gz $BMAP | loadkmap - unset BMAP fi clear diff --git a/source/installer/sources/initrd/etc/rc.d/rc.pcmcia b/source/installer/sources/initrd/etc/rc.d/rc.pcmcia index 1f21be84e..46621da97 100755 --- a/source/installer/sources/initrd/etc/rc.d/rc.pcmcia +++ b/source/installer/sources/initrd/etc/rc.d/rc.pcmcia @@ -14,7 +14,7 @@ DRIVER_OPTS= case "$1" in start) echo "Starting PCMCIA services:" - fgrep -q pcmcia /proc/devices + grep -F -q pcmcia /proc/devices if [ $? -ne 0 ] ; then if [ "$DRIVER" = "probe" ]; then echo " <Probing for PCIC: edit /etc/rc.d/rc.pcmcia>" |