~carbslinux/repository

051404c997c633388071203be5c24f28dfb9f14c — Cem Keylan 1 year, 9 months ago 21fc756
sinit: removed ubase dependency, build respawn and halt onto sinit
M core/sinit/build => core/sinit/build +14 -1
@@ 1,11 1,24 @@
#!/bin/sh -e

ls
cp config.h sinit/config.h
cd sinit
make CFLAGS="$CFLAGS -static" PREFIX=/usr DESTDIR="$1" install
mv "$1/usr/bin/sinit" "$1/usr/bin/init"

cd ..
install -Dm755 poweroff "$1/usr/bin/poweroff"
install -Dm755 reboot "$1/usr/bin/reboot"

install -Dm644 sinit-launch-services.boot "$1/etc/init/sinit-launch-services.boot"
install -Dm644 sinit.post.shutdown "$1/etc/init/sinit.post.shutdown"
install -Dm644 sinit.pre.shutdown "$1/etc/init/sinit.pre.shutdown"

# We are building ubase here so we don't need
# the full package

cd ubase
make halt
make respawn

install -Dm755 halt "$1/usr/bin/halt"
install -Dm755 respawn "$1/usr/bin/respawn"

M core/sinit/checksums => core/sinit/checksums +3 -2
@@ 1,6 1,7 @@
aaccd0515070545174bf962c462686e7719c02c68004bd0b350b98b4c78a90ba  sinit-1.1.tar.gz
2fd1cd03b9ea9b0d08a523634be942177f1a370daa9a120e0279316003fb0ec1  b33bdaa.tar.gz
6f0f1a5f2f43b5bcfd4beaa93e1a49438d398cf758d7813bc6ba86b5156357a8  config.h
f638aaa23383da584d3a56347a8e279abdc7c9c521661ef54a5bc8b955c5632b  reboot
d21a020d7cdb6a328962adac7cc1a8701a413c1dfabd40ac00bf7dc212fa29d1  poweroff
93f3b06594447598af207f44f2dde126f05724fde0a405bd15dd0f446ff26c6f  sinit-launch-services.boot
a6952fbe916d2b9756b7dfc59bc5313a7d3749b22c59ab4db88ea76d4d76f097  sinit.post.shutdown
b8638d409b57b21d0deb11b6c0a5a870c0a6088d7733b205b0265bcc03d13486  sinit-launch-services.boot
913696a0bad385add0ea6207d5c6a8708fb4c74af7340715b12e98a094307e5c  sinit.post.shutdown

M core/sinit/depends => core/sinit/depends +0 -1
@@ 1,2 1,1 @@
carbs-init
ubase

M core/sinit/files/sinit-launch-services.boot => core/sinit/files/sinit-launch-services.boot +2 -2
@@ 2,12 2,12 @@

sinit_run_getty() {
	for getty in 1 2 3 4 5 6; do
		ubase-box respawn /sbin/getty 38400 tty${getty} 2>&1 &
		respawn /sbin/getty 38400 tty${getty} 2>&1 &
	done
}

sinit_runit() {
	ubase-box respawn /usr/bin/runsvdir -P /var/service &
	respawn /usr/bin/runsvdir -P /var/service &
}

[ "$SINIT_ENABLE_GETTY" = 1 ] && sinit_run_getty

M core/sinit/files/sinit.post.shutdown => core/sinit/files/sinit.post.shutdown +2 -2
@@ 6,11 6,11 @@ if [ "$SINIT_SHUTDOWN_HOOKS" = 1 ]; then
	case "$1" in
		reboot)	
			out "Requesting system reboot..."
			/usr/bin/ubase-box halt -r 
			halt -r 
			;;
		*) 
			out "Requesting system poweroff..."
			/usr/bin/ubase-box halt -p 
			halt -p 
			;;
	esac
fi

M core/sinit/post-install => core/sinit/post-install +4 -4
@@ 2,10 2,10 @@

grep -q SINIT_ /etc/init/rc.conf || cat <<EOF >> /etc/init/rc.conf

# Uncomment these to run the scripts for sinit
# SINIT_SHUTDOWN_HOOKS=1
# SINIT_ENABLE_GETTY=1
# SINIT_ENABLE_RUNIT=1
# Comment these to run the scripts for sinit
SINIT_SHUTDOWN_HOOKS=1
SINIT_ENABLE_GETTY=1
SINIT_ENABLE_RUNIT=1
EOF

cat <<EOF

M core/sinit/sources => core/sinit/sources +2 -1
@@ 1,4 1,5 @@
https://dl.carbslinux.org/distfiles/sinit-1.1.tar.gz
https://dl.carbslinux.org/distfiles/sinit-1.1.tar.gz sinit
https://github.com/michaelforney/ubase/archive/b33bdaa.tar.gz ubase
files/config.h
files/reboot
files/poweroff

M core/sinit/version => core/sinit/version +1 -1
@@ 1,1 1,1 @@
1.1 2
1.1 3