You've already forked ziomekos
ZiomekOS v26.9.26
This commit is contained in:
62
bootscripts/Makefile
Normal file
62
bootscripts/Makefile
Normal file
@@ -0,0 +1,62 @@
|
||||
# Largely based on BLFS Bootscripts Makefile from Linux From Scratch
|
||||
SHELL=/bin/bash
|
||||
|
||||
ETCDIR=/etc
|
||||
LIBDIR=${DESTDIR}/lib/services
|
||||
EXTDIR=${DESTDIR}${ETCDIR}
|
||||
MODE=754
|
||||
DIRMODE=755
|
||||
CONFMODE=644
|
||||
|
||||
all:
|
||||
@grep "^install" Makefile | cut -d ":" -f 1
|
||||
@echo "Select an appropriate install target from the above list"
|
||||
|
||||
create-dirs:
|
||||
install -d -m ${DIRMODE} ${EXTDIR}/rc.d/rc{0,1,2,3,4,5,6,S}.d
|
||||
install -d -m ${DIRMODE} ${EXTDIR}/rc.d/init.d
|
||||
install -d -m ${DIRMODE} ${EXTDIR}/sysconfig
|
||||
|
||||
create-service-dir:
|
||||
install -d -m ${DIRMODE} ${LIBDIR}
|
||||
|
||||
install-qemu-ga: create-dirs
|
||||
install -m ${MODE} ziomekos/init.d/qemu-ga ${EXTDIR}/rc.d/init.d/
|
||||
ln -sf ../init.d/qemu-ga ${EXTDIR}/rc.d/rc0.d/K00qemu-ga
|
||||
ln -sf ../init.d/qemu-ga ${EXTDIR}/rc.d/rc1.d/K00qemu-ga
|
||||
ln -sf ../init.d/qemu-ga ${EXTDIR}/rc.d/rc2.d/S35qemu-ga
|
||||
ln -sf ../init.d/qemu-ga ${EXTDIR}/rc.d/rc3.d/S35qemu-ga
|
||||
ln -sf ../init.d/qemu-ga ${EXTDIR}/rc.d/rc4.d/S35qemu-ga
|
||||
ln -sf ../init.d/qemu-ga ${EXTDIR}/rc.d/rc5.d/S35qemu-ga
|
||||
ln -sf ../init.d/qemu-ga ${EXTDIR}/rc.d/rc6.d/K00qemu-ga
|
||||
|
||||
install-local: create-dirs
|
||||
install -m ${MODE} ziomekos/init.d/local ${EXTDIR}/rc.d/init.d/
|
||||
install -m ${DIRMODE} ${EXTDIR}/rc.local.d
|
||||
ln -sf ../init.d/local ${EXTDIR}/rc.d/rc2.d/S36local
|
||||
ln -sf ../init.d/local ${EXTDIR}/rc.d/rc3.d/S36local
|
||||
ln -sf ../init.d/local ${EXTDIR}/rc.d/rc4.d/S36local
|
||||
ln -sf ../init.d/local ${EXTDIR}/rc.d/rc5.d/S36local
|
||||
|
||||
uninstall-qemu-ga:
|
||||
rm -f ${EXTDIR}/rc.d/init.d/qemu-ga
|
||||
rm -f ${EXTDIR}/rc.d/rc0.d/K00qemu-ga
|
||||
rm -f ${EXTDIR}/rc.d/rc1.d/K00qemu-ga
|
||||
rm -f ${EXTDIR}/rc.d/rc2.d/S35qemu-ga
|
||||
rm -f ${EXTDIR}/rc.d/rc3.d/S35qemu-ga
|
||||
rm -f ${EXTDIR}/rc.d/rc4.d/S35qemu-ga
|
||||
rm -f ${EXTDIR}/rc.d/rc5.d/S35qemu-ga
|
||||
rm -f ${EXTDIR}/rc.d/rc6.d/K00qemu-ga
|
||||
|
||||
uninstall-local:
|
||||
rm -f ${EXTDIR}/rc.d/init.d/local
|
||||
rm -f ${EXTDIR}/rc.d/rc2.d/S36local
|
||||
rm -f ${EXTDIR}/rc.d/rc3.d/S36local
|
||||
rm -f ${EXTDIR}/rc.d/rc4.d/S36local
|
||||
rm -f ${EXTDIR}/rc.d/rc5.d/S36local
|
||||
|
||||
.PHONY: all create-dirs create-service-dir \
|
||||
install-qemu-ga \
|
||||
install-local \
|
||||
uninstall-qemu-ga \
|
||||
uninstall-local \
|
||||
65
bootscripts/ziomekos/init.d/local
Executable file
65
bootscripts/ziomekos/init.d/local
Executable file
@@ -0,0 +1,65 @@
|
||||
#!/bin/sh
|
||||
########################################################################
|
||||
# Begin local
|
||||
#
|
||||
# Description : Perform local setup on startup
|
||||
#
|
||||
# Author : Tomek Wójcik <tomek@bthlabs.pl>
|
||||
#
|
||||
# Version : ZiomekOS 26.9.26
|
||||
#
|
||||
########################################################################
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: local
|
||||
# Required-Start: $network
|
||||
# Should-Start: networkmanager wicd
|
||||
# Required-Stop: $network
|
||||
# Should-Stop: networkmanager wicd
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop:
|
||||
# Short-Description: Local Setup
|
||||
# Description: Local Setup
|
||||
# X-LFS-Provided-By: ZiomekOS
|
||||
### END INIT INFO
|
||||
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
PARTS_DIR="/etc/rc.local.d"
|
||||
|
||||
run_parts() {
|
||||
local DIR=$1
|
||||
local SCRIPT RC
|
||||
local RESULT=0
|
||||
|
||||
[ -d "$DIR" ] || return 0
|
||||
|
||||
for SCRIPT in "$DIR"/*; do
|
||||
[ -f "$SCRIPT" ] && [ -x "$SCRIPT" ] || continue
|
||||
|
||||
"$SCRIPT"
|
||||
RC=$?
|
||||
|
||||
if [ "$RC" -ne 0 ]; then
|
||||
log_warning_msg "${SCRIPT} exited with status ${RC}"
|
||||
[ "$RESULT" -eq 0 ] && RESULT=$RC
|
||||
fi
|
||||
done
|
||||
|
||||
return "0"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
log_info_msg "Running rc.local scripts..."
|
||||
evaluate_retval
|
||||
run_parts $PARTS_DIR
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {start}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# End local
|
||||
57
bootscripts/ziomekos/init.d/qemu-ga
Executable file
57
bootscripts/ziomekos/init.d/qemu-ga
Executable file
@@ -0,0 +1,57 @@
|
||||
#!/bin/sh
|
||||
########################################################################
|
||||
# Begin qemu-ga
|
||||
#
|
||||
# Description : Start Qemu Guest Agent
|
||||
#
|
||||
# Author : Tomek Wójcik <tomek@bthlabs.pl>
|
||||
#
|
||||
# Version : ZiomekOS 26.9.26
|
||||
#
|
||||
########################################################################
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: qemu-ga
|
||||
# Required-Start: $network
|
||||
# Should-Start: networkmanager wicd
|
||||
# Required-Stop: $network
|
||||
# Should-Stop: networkmanager wicd
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: Qemu Guest Agent
|
||||
# Description: Qemu Guest Agent
|
||||
# X-LFS-Provided-By: ZiomekOS
|
||||
### END INIT INFO
|
||||
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
log_info_msg "Starting qemu-ga..."
|
||||
start_daemon /usr/bin/qemu-ga -l /var/log/qemu-ga.log -d
|
||||
evaluate_retval
|
||||
;;
|
||||
|
||||
stop)
|
||||
log_info_msg "Stopping qemu-ga..."
|
||||
killproc /usr/bin/qemu-ga
|
||||
evaluate_retval
|
||||
;;
|
||||
|
||||
restart)
|
||||
$0 stop
|
||||
sleep 1
|
||||
$0 start
|
||||
;;
|
||||
|
||||
status)
|
||||
statusproc /usr/bin/qemu-ga
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|status}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# End qemu-ga
|
||||
8
bootscripts/ziomekos/rc.local.d/01-mount-efivars.sh
Executable file
8
bootscripts/ziomekos/rc.local.d/01-mount-efivars.sh
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env /bin/bash
|
||||
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
if [ -d /sys/firmware/efi/efivars ]; then
|
||||
log_info_msg "Mounting EFI vars fs...\n"
|
||||
# mount /sys/firmware/efi/efivars
|
||||
fi
|
||||
Reference in New Issue
Block a user