Fix troubles in calculate.eclass.

Use splash_geninitramfs for update splash.
master
parent d31a8a172e
commit b694291e30

@ -241,10 +241,13 @@ initramfs_pack() {
# Install into initramfs splash data, which descripted by # Install into initramfs splash data, which descripted by
# /etc/splash/tty1/1024x768.cfg # /etc/splash/tty1/1024x768.cfg
calculate_update_splash() { calculate_update_splash() {
ebegin "Update splash screen for $1" if which splash_geninitramfs &>/dev/null && \
initramfs_unpack $1 && [[ -e /etc/splash/tty1 ]]
initramfs_change_spalsh && initramfs_pack $1 then
eend $? ebegin "Update splash screen for $1"
splash_geninitramfs -a $1 tty1
eend $?
fi
} }
# @FUNCTION: calculate_set_kernelversion # @FUNCTION: calculate_set_kernelversion
@ -367,7 +370,29 @@ change_grub() {
# DESCRIPTION: # DESCRIPTION:
# Init LINUXVER,ROOTDEV # Init LINUXVER,ROOTDEV
calculate_initvars() { calculate_initvars() {
LINUXVER=$( get_value linuxver < ${CALCULATE_INI} ) makeProfile=/etc/make.profile
if [[ -f ${CALCULATE_INI} ]]
then
LINUXVER=$( get_value linuxver < ${CALCULATE_INI} )
else
LINUXVER=10
if [[ $(readlink $makeProfile) =~ \
.*(calculate/(server|desktop)/([^/]+)/).* ]]
then
CALCULATEDISTRO=$(echo ${BASH_REMATCH[3]} | tr [:upper:] [:lower:])
metaPkgFile=/var/db/pkg/app-misc
if [[ "$(ls $metaPkgFile | grep ${CALCULATEDISTRO}-meta)" =~ \
${CALCULATEDISTRO}-meta-((.*?)-r[0-9]+|(.*?)) ]]
then
if [[ -n ${BASH_REMATCH[2]} ]]
then
LINUXVER=${BASH_REMATCH[2]}
else
LINUXVER=${BASH_REMATCH[3]}
fi
fi
fi
fi
ROOTDEV=$( get_value root < ${ROOT}/proc/cmdline ) ROOTDEV=$( get_value root < ${ROOT}/proc/cmdline )
} }
@ -390,7 +415,7 @@ calculate_change_version() {
# DESCRIPTION: # DESCRIPTION:
# Get latest regular file by name # Get latest regular file by name
get_last_filename() { get_last_filename() {
findfiles=$(ls $1/$2*$3 2>/dev/null) findfiles=$(ls -d $1/$2*$3 2>/dev/null)
if [[ -n $findfiles ]] if [[ -n $findfiles ]]
then then
for line in $findfiles for line in $findfiles

Loading…
Cancel
Save