-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit
More file actions
executable file
·39 lines (32 loc) · 789 Bytes
/
Copy pathinit
File metadata and controls
executable file
·39 lines (32 loc) · 789 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/busybox sh
/bin/busybox mkdir -p /sbin /bin /usr/sbin /usr/bin
/bin/busybox --install
export PATH="/usr/bin:/bin:/usr/sbin:/sbin"
mkdir -p /proc /sys /dev
mount -t proc proc /proc
mount -t sysfs sysfs /sys
mount -t devtmpfs devtmpfs /dev
ln -s /proc/net/pnp /etc/resolv.conf
mkdir -p /tmp
# shellcheck disable=SC2046
set -- $(cat /proc/cmdline)
ocidd "$@" || (echo "Error: ocidd failed with code $?. Launching emergency shell." && sh)
printf "\rRebooting in 3"
sleep 1
printf "\rRebooting in 2"
sleep 1
printf "\rRebooting in 1"
sleep 1
printf "\rRebooting now!\n"
reboot -f
while true; do
printf "\r%s" '-'
sleep 0.25
printf "\r%s" '|'
sleep 0.25
printf "\r%s" '/'
sleep 0.25
# shellcheck disable=SC1003
printf "\r%s" '\'
sleep 0.25
done