summaryrefslogtreecommitdiffstats
path: root/remote/tools/systemd
diff options
context:
space:
mode:
Diffstat (limited to 'remote/tools/systemd')
-rw-r--r--remote/tools/systemd/data/network@.service13
-rw-r--r--remote/tools/systemd/systemd.build12
2 files changed, 19 insertions, 6 deletions
diff --git a/remote/tools/systemd/data/network@.service b/remote/tools/systemd/data/network@.service
new file mode 100644
index 00000000..01f3a526
--- /dev/null
+++ b/remote/tools/systemd/data/network@.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Setup Network Connection
+Wants=network.target
+Before=network.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/openslx/bin/ip link set dev %I up
+ExecStart=/openslx/sbin/udhcpc -O domain -O nissrv -O nisdomain -t 8 -s /etc/udhcpc.default.script -i %I
+
+[Install]
+WantedBy=multi-user.target
diff --git a/remote/tools/systemd/systemd.build b/remote/tools/systemd/systemd.build
index 981e87b6..14cef7e1 100644
--- a/remote/tools/systemd/systemd.build
+++ b/remote/tools/systemd/systemd.build
@@ -35,14 +35,14 @@ build () {
}
post_copy() {
+ # debug shell on tty9
[ ! -d $INIT_DIR/etc/systemd/system/sysinit.target.wants ] && mkdir -p $INIT_DIR/etc/systemd/system/sysinit.target.wants
- #debug shell on tty9
cp $TOOL_DIR/$TOOL/data/debug-shell.service $INIT_DIR/etc/systemd/system
ln -s ../debug-shell.service $INIT_DIR/etc/systemd/system/sysinit.target.wants
-
+
# dont clear systemd log at startup
-# sed -i.bak "s/ExecStart=-\/sbin\/agetty %I 38400/ExecStart=-\/sbin\/agetty %I 38400 --noclear/g" \
-# $INIT_DIR/usr/lib/systemd/system/getty@.service
- sed -i.bak "s/TTYVTDisallocate=yes/TTYVTDisallocate=no/g" \
- $INIT_DIR/usr/lib/systemd/system/getty@.service
+ sed -i.bak "s/TTYVTDisallocate=yes/TTYVTDisallocate=no/g" $INIT_DIR/usr/lib/systemd/system/getty@.service
+
+ # copy custom network@.service
+ cp $TOOL_DIR/$TOOL/data/network@.service $INIT_DIR/etc/systemd/system
}