File manager - Edit - /home/newsbmcs.com/public_html/static/img/logo/recovery-mode.zip
Back
PK &�Zkة�� � recovery-menunu ȯ�� #!/bin/bash if [ ! -x "$(which whiptail)" ]; then echo "Couldn't find whiptail, starting root shell instead of recovery menu." sulogin clear exit fi systemd-notify --ready || : # include gettext stuff . /lib/recovery-mode/l10n.sh # main READONLY=true while true; do unset items if [ "$READONLY" = "true" ]; then menu_text=$(eval_gettext "Recovery Menu (filesystem state: read-only)") else menu_text=$(eval_gettext "Recovery Menu (filesystem state: read/write)") fi items[c++]="resume" items[c++]=$(eval_gettext " Resume normal boot") for i in /lib/recovery-mode/options/*; do if [ -x "$i" ]; then name="`"$i" test`" if [ $? -eq 0 ]; then items[c++]="${i##*/}" items[c++]=" $name" fi fi done choice="$(whiptail --nocancel --menu "$menu_text" 18 70 10 \ "${items[@]}" \ 3>&1 1>&2 2>&3 3>&-)" if [ -z "$choice" ]; then continue fi if [ "$choice" = "resume" ]; then box_text=$(eval_gettext "You are now going to exit the recovery mode and continue the boot sequence. Please note that some graphic drivers require a full graphical boot and so will fail when resuming from recovery. If that's the case, simply reboot from the login screen and then perform a standard boot.") whiptail --msgbox "$box_text" 12 70 clear touch /run/friendly_recovery.resume systemctl daemon-reload systemctl --no-block isolate default.target exit fi /lib/recovery-mode/options/$choice test mode >/dev/null 2>&1 retval=$? # Hack for the fsck case (needs to be cosidered read/write only when # in read-only mode and read-only only when in read/write mode) if [ "$choice" = "fsck" ] && [ "$READONLY" = "false" ]; then retval=1 fi case "$retval" in 0) # 0 => requires read/write if [ "$READONLY" = "true" ]; then box_text=$(eval_gettext "Continuing will remount your / filesystem in read/write mode and mount any other filesystem defined in /etc/fstab. Do you wish to continue?") whiptail --yesno "$box_text" 10 70 || continue if [ "$choice" = "fsck" ]; then FSCHECK="true" fi . /etc/default/rcS if [ -d /run/systemd/system ]; then [ "$FSCKFIX" = "yes" ] && fsck_mode="-y" || fsck_mode='-a' [ "$FSCHECK" = "true" ] || [ -f /forcefsck ] && fsck $fsck_mode systemctl start --job-mode=ignore-dependencies systemd-remount-fs.service mount -a else [ "$FSCHECK" = "true" ] || [ -f /forcefsck ] && force_fsck="--force-fsck" [ "$FSCKFIX" = "yes" ] && fsck_fix="--fsck-fix" mountall $force_fsck $fsck_fix --no-events fi rm -f /forcefsck if [ "$choice" = "fsck" ]; then echo "" echo $(eval_gettext "Finished, please press ENTER") read TMP fi READONLY=false fi ;; 1) # 1 => read-only only if [ "$READONLY" = "false" ]; then box_text=$(eval_gettext "The option you selected requires your filesystem to be in read-only mode. Unfortunately another option you selected earlier, made you exit this mode. The easiest way of getting back in read-only mode is to reboot your system.") whiptail --msgbox "$box_text" 12 70 continue fi ;; 2) # 2 => works in all cases # nothing to do ;; esac export READONLY /lib/recovery-mode/options/$choice done PK &�Z���u� � options/rootnu ȯ�� #!/bin/sh . /lib/recovery-mode/l10n.sh if [ "$1" = "test" ]; then if [ "$2" = "mode" ]; then exit 2 fi echo $(eval_gettext "Drop to root shell prompt") exit 0 fi /sbin/sulogin PK &�Z��� � options/fscknu ȯ�� #!/bin/sh . /lib/recovery-mode/l10n.sh if [ "$1" = "test" ]; then echo $(eval_gettext "Check all file systems") exit 0 fi # Actual code is in recovery-menu itself exit 0 PK &�Z��K options/networknu ȯ�� #!/bin/sh if [ "$1" = "test" ]; then . /lib/recovery-mode/l10n.sh echo $(eval_gettext "Enable networking") exit 0 fi # Check for existing connectivity check_connectivity() { ip route get 1.2.3.4 >/dev/null 2>&1 retval_route=$? grep ^nameserver -q /etc/resolv.conf retval_resolve=$? if [ "$retval_route" = "0" ] && [ "$retval_resolve" ]; then exit 0 fi } # Try handling networking using systemd if [ -d /run/systemd/system ]; then echo "Enabling networking..." for i in dbus.socket systemd-udevd.service systemd-sysctl.service resolvconf-pull-resolved.path systemd-resolved.service networking.service systemd-networkd.service NetworkManager.service; do systemctl is-enabled -q $i && systemctl start --no-ask-password --job-mode=ignore-dependencies $i done echo "Waiting for networking to be configured..." systemctl is-enabled -q NetworkManager.service && systemctl start --no-ask-password NetworkManager-wait-online.service systemctl is-enabled -q systemd-networkd.service && systemctl start --no-ask-password systemd-networkd-wait-online.service echo "Done." exit 0 fi # Start by trying to bring everything up ifup -a check_connectivity # Then try Network Manager if type NetworkManager >/dev/null 2>&1; then echo "Trying to start NetworkManager..." mkdir -p /run/dbus chown messagebus:messagebus /run/dbus dbus-daemon --system --nopidfile NetworkManager trap "killall dbus-daemon NetworkManager" EXIT HUP INT QUIT PIPE timeout=15 while [ $timeout -ge 0 ]; do check_connectivity sleep 1 timeout=$((timeout-1)) done fi # Try running dhclient on everything else cd /sys/class/net/ for interface in *; do dhclient -1 $interface check_connectivity done exit 0 PK &�Z��_�� � options/apt-snapshotsnu ȯ�� #!/bin/bash set -e . /lib/recovery-mode/l10n.sh # check if its there if [ ! -x /usr/bin/apt-btrfs-snapshot ]; then exit 1 fi # check if its usable, if list returns a non-zero exit code, # we probably run on a system with no snapshot support if ! /usr/bin/apt-btrfs-snapshot list > /dev/null 2>&1; then exit 1 fi # if we make it to this point, show some help if [ "$1" = "test" ]; then echo $(eval_gettext "Revert to old snapshot and reboot") exit 0 fi # get snapshots and show them in whiptail snapshots=$(apt-btrfs-snapshot list | sed 1d) tag_item="" for item in $snapshots; do tag_item="$item snapshot $tag_item" done choice="$(whiptail --menu "$(eval_gettext "Snapshot")" 15 70 6 $tag_item \ 3>&1 1>&2 2>&3 3>&-)" # user selected cancel if [ -z "$choice" ]; then exit 0 fi # set new snapshot and reboot if apt-btrfs-snapshot set-default "$choice"; then reboot fi PK &�ZkHK options/failsafeXnu ȯ�� #!/bin/sh . /lib/recovery-mode/l10n.sh # no failsafe X session if [ ! -e /usr/share/xdiagnose/failsafeXServer ]; then exit 1 fi if [ "$1" = "test" ]; then echo $(eval_gettext "Run in failsafe graphic mode") exit 0 fi /usr/share/xdiagnose/failsafeXServer exit 0 PK &�Z��b@7 7 options/grubnu ȯ�� #!/bin/sh . /lib/recovery-mode/l10n.sh if [ "$1" = "test" ]; then echo $(eval_gettext "Update grub bootloader") exit 0 fi # FIXME: add this too? how to find out boot device? # add menu to ask? #grub-install update-grub echo "" echo $(eval_gettext "Finished, please press ENTER") read TMP exit 0 PK &�Z�+�q^ ^ options/cleannu ȯ�� #!/bin/sh . /lib/recovery-mode/l10n.sh if [ "$1" = "test" ]; then echo $(eval_gettext "Try to make free space") exit 0 fi apt-get clean echo $(eval_gettext "Trying to find packages you don't need (apt-get autoremove), please review carefully.") apt-get autoremove echo "" echo $(eval_gettext "Finished, please press ENTER") read TMP exit 0 PK &�Z�Ă�� � options/system-summarynu ȯ�� #!/bin/sh . /lib/recovery-mode/l10n.sh if [ "$1" = "test" ]; then if [ "$2" = "mode" ]; then exit 2 fi echo $(eval_gettext "System summary") exit 0 fi # Get FS state if [ "$READONLY" = "true" ]; then fs_state=$(eval_gettext 'Read-only mode') else fs_state=$(eval_gettext 'Read/Write mode') fi # Check for existing connectivity net_state=$(eval_gettext 'none') ip route get 1.2.3.4 >/dev/null 2>&1 && net_state=$(eval_gettext 'IP configured') && grep ^nameserver -q /etc/resolv.conf && net_state=$(eval_gettext 'IP and DNS configured') # Get CPU information cpu_count=$(ls -1 /sys/devices/system/cpu/ | grep "^cpu[0-9]*$" | wc -l) if [ -f /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq ]; then cpu_freq=$(($(cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq) / 1000)) else cpu_freq=0 fi cpu_info="${cpu_count}x${cpu_freq}MHz" # Get RAID information if [ -n "$(grep md /proc/mdstat)" ]; then raid_state=$(cat /proc/mdstat | grep -v Personalities) else raid_state=$(eval_gettext 'No software RAID detected (mdstat)') fi # LVM if [ -z "$(which vgscan)" ] then lvm_state=$(eval_gettext 'No LVM detected (vgscan)') else if [ "$(id -u)" -ne 0 ] then lvm_state=$(eval_gettext 'Unknown (must be run as root)') else lvm_state="$(eval_gettext 'Physical Volumes:')" pvck >/dev/null 2>&1 if [ $? -eq 0 ]; then lvm_state="$lvm_state $(eval_gettext 'ok (good)')" else lvm_state="$lvm_state $(eval_gettext 'not ok (BAD)')" fi lvm_state="$lvm_state $(eval_gettext 'Volume Groups:')" vgck >/dev/null 2>&1 if [ $? -eq 0 ]; then lvm_state="$lvm_state $(eval_gettext 'ok (good)')" else lvm_state="$lvm_state $(eval_gettext 'not ok (BAD)')" fi fi fi # Get package system information if [ "$READONLY" = "true" ]; then apt_state=$(eval_gettext 'unknown (read-only filesystem)') elif [ "$(id -u)" -ne 0 ]; then apt_state=$(eval_gettext 'unknown (must be run as root)') else apt-get -qq --no-act check if [ $? -eq 0 ]; then apt_state=$(eval_gettext 'yes (good)') else apt_state=$(eval_gettext 'no (BAD)') fi fi msg="$(eval_gettext '(Use arrows/PageUp/PageDown keys to scroll and TAB key to select)') $(eval_gettext '=== General information ===') $(eval_gettext 'System mode:') $fs_state $(eval_gettext 'CPU information:') $cpu_info $(eval_gettext 'Network connectivity:') $net_state $(eval_gettext '=== Detailed disk usage ===') $(df -h 2>/dev/null) $(eval_gettext '=== Software RAID state ===') $raid_state $(eval_gettext '=== LVM state ===') $lvm_state $(eval_gettext '=== Detailed memory usage ===') $(free -m) $(eval_gettext '=== Detailed network configuration ===') $(ifconfig) $(eval_gettext '=== System database (APT) ===') $(eval_gettext 'Database is consistent:') $apt_state " whiptail --scrolltext --msgbox "$msg" 21 80 --title $(eval_gettext "System summary") exit 0 PK &�Z�Q;�� � options/dpkgnu ȯ�� #!/bin/sh . /lib/recovery-mode/l10n.sh if [ "$1" = "test" ]; then echo $(eval_gettext "Repair broken packages") exit 0 fi # do some cleanup rm -f /var/lib/apt/lists/partial/* rm -f /var/cache/apt/archives/partial/* # check and use dist-upgraders partial mode if we have it, # it contains a lot of useful repair code script=/usr/lib/python3/dist-packages/DistUpgrade/dist-upgrade.py if [ -e $script ]; then env RELEASE_UPGRADER_NO_SCREEN=1 python3 "$script" --partial --frontend DistUpgradeViewText \ --datadir /usr/share/ubuntu-release-upgrader else dpkg --configure -a apt-get update apt-get install -f apt-get dist-upgrade fi echo "" echo $(eval_gettext "Finished, please press ENTER") read TMP exit 0 PK &�Z>���f f l10n.shnu �[��� # default eval_gettext() to ensure that we do not fail # if gettext-base is not installed eval_gettext() { echo "$1" } # Deal with systems where /usr isn't mounted if [ ! -d /usr/share/locale ]; then return fi # blacklist some languages that we don't have a good console fonts for # see bug #573502 in_lang_blacklist() { LANG_BLACKLIST="ar_ he_IL ja_JP ko_KR ru_RU sl_SI vi_VN zh_" LANG=$1 for b in $LANG_BLACKLIST; do # equal to lang.startswith(b) if expr match "$LANG" ^"$b" >/dev/null ; then export LANG=C.UTF-8 export LANGUAGE=en return 0 fi done return 1 } # There is no environment set, as these steps are skipped, # so we need to source the variables needed for localization ourselves if [ -r /etc/default/locale ]; then . /etc/default/locale if ! in_lang_blacklist "$LANG"; then export LANG LANGUAGE fi elif [ -r /etc/environment ]; then . /etc/environment if ! in_lang_blacklist "$LANG"; then export LANG LANGUAGE fi fi . gettext.sh export TEXTDOMAIN=friendly-recovery export TEXTDOMAINDIR=/usr/share/locale PK &�Zkة�� � recovery-menunu ȯ�� PK &�Z���u� � options/rootnu ȯ�� PK &�Z��� � options/fscknu ȯ�� PK &�Z��K � options/networknu ȯ�� PK &�Z��_�� � A options/apt-snapshotsnu ȯ�� PK &�ZkHK options/failsafeXnu ȯ�� PK &�Z��b@7 7 k options/grubnu ȯ�� PK &�Z�+�q^ ^ � options/cleannu ȯ�� PK &�Z�Ă�� � y options/system-summarynu ȯ�� PK &�Z�Q;�� � �+ options/dpkgnu ȯ�� PK &�Z>���f f �. l10n.shnu �[��� PK \ J3
| ver. 1.4 |
Github
|
.
| PHP 8.2.28 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings