From 8df1d35909ec2d57a6845f5b2c26ee1e83cfd032 Mon Sep 17 00:00:00 2001 From: Woodpecker CI Date: Tue, 3 Jun 2025 14:32:34 +0000 Subject: Woodpecker CI 5171f1fdd74e7137c305450dd69a29fa5be4143f [SKIP CI] --- initscripts/rc.shutdown | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 initscripts/rc.shutdown (limited to 'initscripts/rc.shutdown') diff --git a/initscripts/rc.shutdown b/initscripts/rc.shutdown new file mode 100644 index 00000000..68b47022 --- /dev/null +++ b/initscripts/rc.shutdown @@ -0,0 +1,27 @@ +#!/bin/sh + +echo "shutting down" + +if [ -x /etc/rc.shutdown.local ]; then + /etc/rc.shutdown.local +fi + +if [ "$(command -v udevadm)" ]; then + udevadm control --exit +fi + +sv down /var/service/* +dd if=/dev/urandom of=/var/lib/random-seed count=1 bs=512 2>/dev/null +hwclock -w -u +kill -s TERM -1 +sleep 2 +kill -s KILL -1 +swapoff -a +ip link set lo down +umount -a -r -t noproc +mount -o remount,ro / +sync +sleep 1 +wait + +echo bye -- cgit v1.2.3