403Webshell
Server IP : 3.128.248.115  /  Your IP : 3.147.75.46
Web Server : Apache/2.4.41 (Ubuntu)
System : Linux ip-172-31-33-233 5.15.0-1037-aws #41~20.04.1-Ubuntu SMP Mon May 22 18:18:00 UTC 2023 x86_64
User : www-data ( 33)
PHP Version : 7.4.28
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /bin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /bin/finalrd
#!/bin/sh
# SPDX-License-Identifier: GPL-3.0-only

set -e

# for initramfs-tools hook-functions
export DESTDIR=/run/initramfs
# for /usr/lib/dracut/dracut-install
export DESTROOTDIR=$DESTDIR
# initramfs-tools now requires this to be set
export verbose=n

# something already created shutdown initramfs
# same check is done by e.g. dracut-shutdown
# it is expected that any shutdown initramfs is good enough
[ ! -x $DESTDIR/bin/sh ] || exit 0

# /run may be mounted noexec,nosuid => fix it
# it should be a more normal/default filesystem post-pivot
# systemd-shutdownd pivot does not currently remount /run with these
# options
mount -o remount,exec /run

### SHUTDOWN SUPPORT ###
# our shutdown sequence is to be controled by systemd-shutdown which
# will unmount all the things, and run our hooks

LD=`grep -Eow '/.*ld-.*.so' /proc/self/maps | head -1`
for bin in /bin/sh /lib/systemd/systemd-shutdown
do
    rm -f /run/finalrd-libs.conf
    touch /run/finalrd-libs.conf
    for lib in `$LD --list $bin | grep -Eow "/.* "`
    do
        if [ "$lib" = '=>' ]
        then
            continue
        fi
        if grep -q $lib /run/finalrd-libs.conf
        then
            continue
        fi
        echo "d $(dirname $DESTDIR$lib)" >> /run/finalrd-libs.conf
        if [ -L $lib ]
        then
            target=$(realpath -e $lib)
            echo "C $DESTDIR$target - - - - $target" >> /run/finalrd-libs.conf
            echo "L $DESTDIR$lib - - - - $(readlink $lib)" >> /run/finalrd-libs.conf
        else
            echo "C $DESTDIR$lib - - - - $lib" >> /run/finalrd-libs.conf
        fi
    done
done
systemd-tmpfiles --create /usr/lib/finalrd/finalrd-static.conf /run/finalrd-libs.conf

### HOOKS SUPPORT ###
# Without initramfs-tools, hooks are not supported
[ -e /usr/share/initramfs-tools/hook-functions ] || exit 0
. /usr/share/initramfs-tools/hook-functions

for d in /usr/share/finalrd /etc/finalrd /run/finalrd
do
    if [ -d $d ]
    then
	run-parts -v --regex='^.*\.finalrd$' --arg=setup -- $d || :
	find $d -executable -name '*.finalrd' -exec cp -- "{}" $DESTDIR/lib/systemd/system-shutdown \;
    fi
done

ldconfig -r $DESTDIR

Youez - 2016 - github.com/yon3zu
LinuXploit