Skip to content

Commit

Permalink
Modifications in etc/initrd.splash to patch official cdupdate
Browse files Browse the repository at this point in the history
  • Loading branch information
NiKiZe committed Jul 30, 2021
1 parent 735c8dd commit a7048f5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions files/etc/initrd.splash
@@ -1,20 +1,22 @@
# Hack to replace cdupdate function
#https://github.com/gentoo/genkernel/blob/369cfa98f72675a285ec98439e9054ab57b234c9/defaults/initrd.scripts#L2469-L2491
# called from
#https://github.com/gentoo/genkernel/blob/369cfa98f72675a285ec98439e9054ab57b234c9/defaults/linuxrc#L9

cdupdate() {
good_msg "cdupdate from initrd.splash hack"
if [ "${CDROOT}" = '1' ]
then
cdupdate_path=''
for p in /${NEW_ROOT}/${CDROOT_PATH}/ /${CDROOT_PATH}/
do
[ -x "${p}/cdupdate.sh" ] && cdupdate_path="${p}/cdupdate.sh" && break
[ -x "${p}cdupdate.sh" ] && cdupdate_path="${p}cdupdate.sh" && break
done

if [ -n "${cdupdate_path}" ]
then
good_msg "Running cdupdate.sh (${cdupdate_path})"
run ${cdupdate_path}
run . ${cdupdate_path}
if [ "$?" != '0' ]
then
bad_msg "Executing cdupdate.sh failed!"
Expand Down

2 comments on commit a7048f5

@NiKiZe
Copy link
Owner Author

@NiKiZe NiKiZe commented on a7048f5 Jul 30, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@NiKiZe
Copy link
Owner Author

@NiKiZe NiKiZe commented on a7048f5 Jul 31, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Turns out this is not needed at all, just use correct or no shebang.
Don't use #!/bin/bash, best is probably to don't have anything at all at the top of cdupdate.sh

Which means that everything is working without this

Please sign in to comment.