installer: convert to systemd

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2013-08-12 17:58:15 +02:00
parent 3d8c2d8522
commit 04ea02e887
4 changed files with 36 additions and 33 deletions

View File

@ -1,33 +0,0 @@
################################################################################
# Copyright (C) 2009-2010 OpenELEC.tv
# http://www.openelec.tv
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
# starting Installer
#
# runlevels: installer
progress "starting Installer"
chvt 1
while true; do
/usr/bin/installer
done
sync
poweroff

View File

@ -59,3 +59,8 @@ makeinstall_target() {
cp $PKG_DIR/config/installer.conf $INSTALL/etc cp $PKG_DIR/config/installer.conf $INSTALL/etc
fi fi
} }
post_install() {
enable_service installer.service
}

View File

@ -0,0 +1,22 @@
[Unit]
Description=XBMC Media Center
DefaultDependencies=no
Conflicts=shutdown.target
After=basic.target
Before=shutdown.target
Requires=installer.target
[Service]
ExecStart=/usr/bin/installer
Type=idle
StandardInput=tty-force
StandardOutput=inherit
StandardError=inherit
KillMode=process
# Bash ignores SIGTERM, so we send SIGHUP instead, to ensure that bash
# terminates cleanly.
KillSignal=SIGHUP
[Install]
WantedBy=installer.target

View File

@ -0,0 +1,9 @@
[Unit]
Description=OpenELEC installer
Requires=basic.target
After=basic.target
Conflicts=rescue.target multi-user.target graphical.target
AllowIsolate=yes
[Install]
Alias=default.target