From 04ef7ad76f526bcde22aae47fc8e418b0e03e0c0 Mon Sep 17 00:00:00 2001 From: milisbir Date: Wed, 23 Aug 2017 19:04:00 +0300 Subject: [PATCH] plymouth.servisi --- ayarlar/servisler/mbd/init.d/plymouth | 86 +++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 ayarlar/servisler/mbd/init.d/plymouth diff --git a/ayarlar/servisler/mbd/init.d/plymouth b/ayarlar/servisler/mbd/init.d/plymouth new file mode 100644 index 000000000..797743550 --- /dev/null +++ b/ayarlar/servisler/mbd/init.d/plymouth @@ -0,0 +1,86 @@ +#!/bin/sh + +### BEGIN INIT INFO +# Provides: plymouth +# Required-Start: udev $remote_fs $all +# Required-Stop: $remote_fs +# Should-Start: $x-display-manager +# Should-Stop: $x-display-manager +# Default-Start: 2 3 4 5 +# Default-Stop: 0 6 +# Short-Description: Stop plymouth during boot and start it on shutdown +### END INIT INFO + +PATH="/sbin:/bin:/usr/sbin:/usr/bin" +NAME="plymouth" +DESC="Boot splash manager" + +test -x /sbin/plymouthd || exit 0 + +if [ -r "/etc/default/${NAME}" ] +then + . "/etc/default/${NAME}" +fi + +set -e + +for ARGUMENT in $(cat /proc/cmdline) +do + case "${ARGUMENT}" in + splash*) + SPLASH="true" + ;; + + nosplash*) + SPLASH="false" + ;; + esac +done + +case "${1}" in + start) + case "${SPLASH}" in + true) + /bin/plymouth --quit + ;; + esac + ;; + + stop) + case "${SPLASH}" in + true) + if ! plymouth --ping + then + /sbin/plymouthd --mode=shutdown --attach-to-session + fi + + RUNLEVEL="$(/sbin/runlevel | cut -d " " -f 2)" + + case "${RUNLEVEL}" in + 0) + TEXT="Shutting down system..." + ;; + + 6) + TEXT="Restarting system..." + ;; + esac + + /bin/plymouth message --text="${TEXT}" + + /bin/plymouth --show-splash + ;; + esac + ;; + + restart|force-reload) + + ;; + + *) + echo "Usage: ${0} {start|stop|restart|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0