File tree Expand file tree Collapse file tree 4 files changed +25
-8
lines changed
config/rootfs-overlay/etc Expand file tree Collapse file tree 4 files changed +25
-8
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
+ # ## BEGIN INIT INFO
3
+ # Provides: setup
4
+ # Required-Start: $network
5
+ # Required-Stop:
6
+ # Default-Start: 2 3 4 5
7
+ # Default-Stop:
8
+ # Short-Description: Linux Exploit Dev Environment Setup
9
+ # Description: Linux Exploit Dev Environment Setup
10
+ # ## END INIT INFO
2
11
3
12
case " $1 " in
4
13
start)
14
+ # Setup networking
15
+ ETH_IF=" $( ls /sys/class/net | grep -E ' ^(eth|enp)' ) "
16
+ ip link set " $ETH_IF " up
17
+ if [ -x " $( command -v udhcpc) " ]; then
18
+ udhcpc # Busybox DHCP
19
+ elif [ -x " $( command -v dhclient) " ]; then
20
+ dhclient # Ubuntu DHCP
21
+ fi
22
+
5
23
# If the user already exists this won't cause any problems
6
24
adduser user --disabled-password 2> /dev/null
7
25
@@ -16,7 +34,7 @@ case "$1" in
16
34
17
35
# Only mount binder if the kernel supports it
18
36
cat /proc/filesystems | grep binder > /dev/null
19
- if [[ $? -eq 0 ] ]; then
37
+ if [ $? -eq 0 ]; then
20
38
mkdir -p /dev/binderfs
21
39
mount -t binder binder /dev/binderfs
22
40
ln -s /dev/binderfs/binder /dev/binder
Original file line number Diff line number Diff line change 14
14
# process == program to run
15
15
16
16
# Startup the system
17
+ ::sysinit:/bin/mount -t devtmpfs devtmpfs /dev
17
18
::sysinit:/bin/mount -t proc proc /proc
18
19
::sysinit:/bin/mount -t sysfs nodev /sys
19
20
::sysinit:/bin/mount -o remount,rw /
@@ -26,7 +27,7 @@ null::sysinit:/bin/ln -sf /proc/self/fd/1 /dev/stdout
26
27
null::sysinit:/bin/ln -sf /proc/self/fd/2 /dev/stderr
27
28
::sysinit:/bin/hostname -F /etc/hostname
28
29
# now run any rc scripts
29
- ::sysinit:/etc/init.d/rcS
30
+ ::sysinit:/etc/rc
30
31
31
32
# Instead of running getty on the serial port, we can directly run a bash login
32
33
# shell so we're immediately logged in as root
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ # TODO: Properly run all rc scripts
4
+ /etc/init.d/setup start
You can’t perform that action at this time.
0 commit comments