Skip to content

Commit

Permalink
Merge pull request #2083 from OliverO2/update_opalpba
Browse files Browse the repository at this point in the history
Updated the OPALPBA workflow:
Set USE_RESOLV_CONF='no' as networking is not required/available in the PBA.
Avoid copying in the entire /etc/alternatives directory as its links could pull in
lots of unwanted stuff, which is not required in rescue systems.
Clean up plymouth/unlock service startup.
  • Loading branch information
jsmeix committed Mar 15, 2019
2 parents cfcf7be + 3dfd28a commit edbb7c9
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
Expand Up @@ -20,10 +20,11 @@ SSH_ROOT_PASSWORD=''
# Disable non-essential stuff
SSH_FILES='no'
USE_DHCLIENT='no'
USE_RESOLV_CONF='no'

# Include plymouth boot animation and 'clear' if available
PROGS+=( plymouth plymouthd clear )
COPY_AS_IS+=( /etc/alternatives /usr/lib/x86_64-linux-gnu/plymouth /usr/share/plymouth )
COPY_AS_IS+=( /etc/alternatives/*plymouth* /usr/lib/x86_64-linux-gnu/plymouth /usr/share/plymouth )

# Redirect output
[[ -n "$OPAL_PBA_OUTPUT_URL" ]] || Error "The OPAL_PBA_OUTPUT_URL configuration variable must be set."
Expand Down
19 changes: 12 additions & 7 deletions usr/share/rear/skel/default/etc/scripts/unlock-opal-disks
Expand Up @@ -101,9 +101,6 @@ See history for useful commands. Exit the shell to shut down the system.
shutdown now
}

trap emergency_response EXIT
use_plymouth && plymouth update-root-fs --read-write

function stop_error_handling() {
trap - EXIT
}
Expand Down Expand Up @@ -135,17 +132,25 @@ function instant_poweroff() {
}


trap emergency_response EXIT


if use_plymouth; then
# Initialize boot splash screen animation if available
plymouth update-root-fs --read-write
else
# Clear screen if running without plymouth boot animation and if 'clear' is available
type -p clear &>/dev/null && clear
fi


# Minimal system setup
# TODO: split system setup scripts into PBA and rescue categories to protect against script renaming
for system_setup_script in 00-functions.sh 10-console-setup.sh 40-start-udev-or-load-modules.sh; do
source "/etc/scripts/system-setup.d/$system_setup_script"
done


# Clear screen if running without plymouth boot animation and if 'clear' is available
! use_plymouth && type -p clear &>/dev/null && clear


# Find TCG Opal 2-compliant disks
devices=( $(opal_devices) )
declare -i device_count=${#devices[@]}
Expand Down
@@ -1,7 +1,8 @@
[Unit]
Description=Show Plymouth Boot Screen
DefaultDependencies=no
Before=systemd-udev-trigger.service systemd-udevd.service
After=systemd-udev-trigger.service systemd-udevd.service rear-boot-helper.service
Before=systemd-journald.service
ConditionKernelCommandLine=!plymouth.enable=0
ConditionKernelCommandLine=!nosplash
ConditionKernelCommandLine=splash
Expand Down

0 comments on commit edbb7c9

Please sign in to comment.