Skip to content

Commit c771b40

Browse files
committed
rand_check_poweroff.sh + random stuff
1 parent c052a83 commit c771b40

File tree

3 files changed

+21
-4
lines changed

3 files changed

+21
-4
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ Testing you should do before pushing: new modules:
77
New arch:
88

99
- `./build -a ARCH && ./run -a ARCH`
10-
- `wget google.com` for Internet
10+
- `wget google.com && cat index.html` for Internet
1111
- `./run -a ARCH -d` and `./rungdb -a ARCH`

rootfs_overlay/rand_check_poweroff.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/sh
2+
set -ex
3+
/rand_check.out
4+
5+
# Check if network is being replayed.
6+
#
7+
# TODO; requires internet to be up, which is done by inittab.
8+
# We could do this with a /etc/init.d/SXX file,
9+
# but how to both check that into git, and make it optional?
10+
#
11+
# https://superuser.com/questions/635020/how-to-know-current-time-from-internet-from-command-line-in-linux
12+
# Raw IP because was failing with hostname:
13+
# https://unix.stackexchange.com/questions/124283/busybox-ping-ip-works-but-hostname-nslookup-fails-with-bad-address
14+
# https://tf.nist.gov/tf-cgi/servers.cgi
15+
#
16+
#echo | nc 129.6.15.28 13
17+
18+
# busybox's poweroff panics, TODO why. Likely tries to kill shell.
19+
# So just use our super raw command.
20+
/poweroff.out

run

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ set -e
44

55
# CLI handling.
66
arch=x86_64
7-
debug=false
87
debug_qemu=''
98
kgdb=false
109
nographic=false
@@ -20,14 +19,12 @@ while getopts a:de:knqt:x OPT; do
2019
arch="$OPTARG"
2120
;;
2221
d)
23-
debug=true
2422
extra_flags="$extra_flags -S -s"
2523
;;
2624
e)
2725
extra_append="$extra_append $OPTARG"
2826
;;
2927
k)
30-
debug=true
3128
extra_append="$extra_append kgdbwait"
3229
# For those who want to try KDB.
3330
#extra_append="$extra_append kgdbwait kgdboc=kbd"

0 commit comments

Comments
 (0)