diff options
-rw-r--r-- | busybox.morph | 7 | ||||
-rw-r--r-- | systemd-units/ntpd.service.in | 6 |
2 files changed, 12 insertions, 1 deletions
diff --git a/busybox.morph b/busybox.morph index a27a2ebe7..cc65d4400 100644 --- a/busybox.morph +++ b/busybox.morph @@ -47,15 +47,20 @@ ], "build-commands": [ "for f in systemd-units/ifup@.service; do sed -e 's|@rootprefix@||g' \"$f.in\" >\"$f\"; done", + "for f in systemd-units/ntpd.service; do sed -e 's|@userprefix@|/usr|g' \"$f.in\" >\"$f\"; done", "make" ], "install-commands": [ "if [ \"$PREFIX\" = /usr ]; then PREFIX=; fi && make CONFIG_PREFIX=\"$DESTDIR$PREFIX\" install && chmod 6755 \"$DESTDIR$PREFIX\"/bin/busybox", "mkdir -p \"$DESTDIR/lib/systemd/system/\"", "for f in systemd-units/ifup@.service; do install -m 644 \"$f\" \"$DESTDIR/lib/systemd/system\"; done", + "for f in systemd-units/ntpd.service; do install -m 644 \"$f\" \"$DESTDIR/lib/systemd/system\"; done", "mkdir -p \"$DESTDIR/lib/udev/rules.d\"", "for f in udev-rules/100-baserock.rules; do install -m 644 \"$f\" \"$DESTDIR/lib/udev/rules.d\"; done", "mkdir -p \"$DESTDIR$PREFIX\"/share/udhcpc", - "cp examples/udhcp/simple.script \"$DESTDIR$PREFIX\"/share/udhcpc/default.script" + "mkdir -p \"$DESTDIR/etc/systemd/system/multi-user.target.wants\"", + "ln -s $DESTDIR/lib/systemd/system/ntpd.service $DESTDIR/etc/systemd/system/multi-user.target.wants", + "cp examples/udhcp/simple.script \"$DESTDIR$PREFIX\"/share/udhcpc/default.script", + "cp scripts/ntpd-set.sh \"$DESTDIR$PREFIX\"/bin/ntpd-set.sh && chmod 6755 \"$DESTDIR$PREFIX\"/bin/ntpd-set.sh" ] } diff --git a/systemd-units/ntpd.service.in b/systemd-units/ntpd.service.in new file mode 100644 index 000000000..1abc4f3a7 --- /dev/null +++ b/systemd-units/ntpd.service.in @@ -0,0 +1,6 @@ +[Unit] +Description=Service to use ntpd to set the date and time + +[Service] +ExecStart=/usr/bin/ntpd-set.sh +RemainAfterExit=true |