REDROOM
PHP 8.5.2
Path:
Logout
Edit File
Size: 1.76 KB
Close
/lib/recovery-mode/options/network
Text
Base64
#!/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
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 9
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
apt-snapshots
914 B
lrwxr-xr-x
2018-10-02 17:24:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
clean
350 B
lrwxr-xr-x
2018-10-02 17:24:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
dpkg
740 B
lrwxr-xr-x
2018-10-02 17:24:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
failsafeX
274 B
lrwxr-xr-x
2018-10-02 17:24:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
fsck
177 B
lrwxr-xr-x
2018-10-02 17:24:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
grub
311 B
lrwxr-xr-x
2018-10-02 17:24:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
network
1.76 KB
lrwxr-xr-x
2021-01-27 15:53:50
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
root
191 B
lrwxr-xr-x
2018-10-02 17:24:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
system-summary
2.95 KB
lrwxr-xr-x
2018-10-02 17:24:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).