diff options
Diffstat (limited to 'source/a')
-rwxr-xr-x | source/a/elilo/elilo.SlackBuild | 2 | ||||
-rw-r--r-- | source/a/elilo/eliloconfig | 6 | ||||
-rw-r--r-- | source/a/sysvinit-scripts/default/efivarfs | 7 | ||||
-rw-r--r-- | source/a/sysvinit-scripts/doinst.sh | 1 | ||||
-rw-r--r-- | source/a/sysvinit-scripts/scripts/rc.S | 25 | ||||
-rwxr-xr-x | source/a/sysvinit-scripts/sysvinit-scripts.SlackBuild | 5 |
6 files changed, 38 insertions, 8 deletions
diff --git a/source/a/elilo/elilo.SlackBuild b/source/a/elilo/elilo.SlackBuild index 57f247959..bf7d70990 100755 --- a/source/a/elilo/elilo.SlackBuild +++ b/source/a/elilo/elilo.SlackBuild @@ -24,7 +24,7 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=elilo VERSION=${VERSION:-$(echo $PKGNAM*.tar.?z* | rev | cut -f 2 -d - | rev)} -BUILD=${BUILD:-15} +BUILD=${BUILD:-16} if [ -z "$ARCH" ]; then case "$( uname -m )" in diff --git a/source/a/elilo/eliloconfig b/source/a/elilo/eliloconfig index bcded54d8..a662927bf 100644 --- a/source/a/elilo/eliloconfig +++ b/source/a/elilo/eliloconfig @@ -176,12 +176,6 @@ if [ "$REPLY" = "skip" ]; then exit fi -# Make sure efivarfs is active since we'll need it to -# change UEFI boot menu entries: -if [ "$(/bin/ls /sys/firmware/efi/efivars 2> /dev/null | wc -l)" = "0" ]; then - mount -t efivarfs none /sys/firmware/efi/efivars -fi - efibootmgr -v | rev | cut -f 2- | rev | grep Boot0 | grep Slackware | while read line ; do # Reject entries that don't exactly match as not our business if [ ! "$(echo $line | cut -f 2- -d ' ')" = "Slackware" ]; then diff --git a/source/a/sysvinit-scripts/default/efivarfs b/source/a/sysvinit-scripts/default/efivarfs new file mode 100644 index 000000000..973e041d7 --- /dev/null +++ b/source/a/sysvinit-scripts/default/efivarfs @@ -0,0 +1,7 @@ +# By default, we will mount efivarfs read-write on /sys/firmware/efi/efivars. +# This is needed in order to create or modify EFI boot menu entries. +# If you do not want this, you may set the variable below to 'ro' for +# read-only, or 'nomount' (or anything else) if you do not want rc.S to mount +# efivarfs. However, if might still be mounted by /etc/fstab or elsewhere. + +EFIVARFS=rw diff --git a/source/a/sysvinit-scripts/doinst.sh b/source/a/sysvinit-scripts/doinst.sh index c11a17985..ad6980247 100644 --- a/source/a/sysvinit-scripts/doinst.sh +++ b/source/a/sysvinit-scripts/doinst.sh @@ -24,6 +24,7 @@ config etc/rc.d/rc.sysvinit.new config etc/rc.d/rc.modules.new config etc/rc.d/rc.modules.local.new config etc/default/cpufreq.new +config etc/default/efivarfs.new ( cd etc/rc.d ; rm -rf rc.0 ) ( cd etc/rc.d ; ln -sf rc.6 rc.0 ) diff --git a/source/a/sysvinit-scripts/scripts/rc.S b/source/a/sysvinit-scripts/scripts/rc.S index 7c004e6f5..37eaac2f9 100644 --- a/source/a/sysvinit-scripts/scripts/rc.S +++ b/source/a/sysvinit-scripts/scripts/rc.S @@ -24,6 +24,31 @@ if [ ! -d /sys/kernel -a -z "$container" ]; then /sbin/mount -v sysfs /sys -n -t sysfs 2> /dev/null fi +# 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. To modify this behavior, edit the +# file: /etc/default/efivarfs +# Only try to mount if this directory exists (so the kernel supports efivarfs): +if [ -d /sys/firmware/efi/efivars ]; then + # Only try to mount if efivarfs is not already mounted: + if ! mount | grep -wq efivarfs ; then + # Mount according to /etc/default/efivarfs: + if [ -r /etc/default/efivarfs ]; then + . /etc/default/efivarfs + else # default + EFIVARFS=rw + fi + case "$EFIVARFS" in + 'rw') + mount -o rw -t efivarfs none /sys/firmware/efi/efivars + ;; + 'ro') + mount -o ro -t efivarfs none /sys/firmware/efi/efivars + ;; + esac + fi +fi + # If /run exists, mount a tmpfs on it (unless the # initrd has already done so): if [ -d /run -a -z "$container" ]; then diff --git a/source/a/sysvinit-scripts/sysvinit-scripts.SlackBuild b/source/a/sysvinit-scripts/sysvinit-scripts.SlackBuild index 0d6acafd4..60b17e1e3 100755 --- a/source/a/sysvinit-scripts/sysvinit-scripts.SlackBuild +++ b/source/a/sysvinit-scripts/sysvinit-scripts.SlackBuild @@ -25,7 +25,7 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=sysvinit-scripts VERSION=${VERSION:-15.1} ARCH=noarch -BUILD=${BUILD:-4} +BUILD=${BUILD:-5} # If the variable PRINT_PACKAGE_NAME is set, then this script will report what # the name of the created package would be, and then exit. This information @@ -56,6 +56,9 @@ chown root:root $PKG/etc/inittab.new mkdir -p $PKG/etc/default cat $CWD/default/cpufreq > $PKG/etc/default/cpufreq.new +# Install /etc/default/efivarfs.new: +cat $CWD/default/efivarfs > $PKG/etc/default/efivarfs.new + mkdir -p $PKG/install zcat $CWD/doinst.sh > $PKG/install/doinst.sh cat $CWD/slack-desc > $PKG/install/slack-desc |