/[gentoo-x86]/eclass/systemd.eclass
Gentoo

Diff of /eclass/systemd.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.25 Revision 1.26
1# Copyright 1999-2013 Gentoo Foundation 1# Copyright 1999-2013 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/systemd.eclass,v 1.25 2013/04/13 22:49:21 floppym Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/systemd.eclass,v 1.26 2013/07/27 10:36:55 mgorny Exp $
4 4
5# @ECLASS: systemd.eclass 5# @ECLASS: systemd.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# systemd@gentoo.org 7# systemd@gentoo.org
8# @BLURB: helper functions to install systemd units 8# @BLURB: helper functions to install systemd units
250 eend $? 250 eend $?
251 else 251 else
252 debug-print "${FUNCNAME}: journalctl not found." 252 debug-print "${FUNCNAME}: journalctl not found."
253 fi 253 fi
254} 254}
255
256# @FUNCTION: systemd_is_booted
257# @DESCRIPTION:
258# Check whether the system was booted using systemd.
259#
260# This should be used purely for informational purposes, e.g. warning
261# user that he needs to use systemd. Installed files or application
262# behavior *must not* rely on this. Please remember to check MERGE_TYPE
263# to not trigger the check on binary package build hosts!
264#
265# Returns 0 if systemd is used to boot the system, 1 otherwise.
266#
267# See: man sd_booted
268systemd_is_booted() {
269 debug-print-function ${FUNCNAME} "${@}"
270
271 [[ -d /run/systemd/system ]]
272 local ret=${?}
273
274 debug-print "${FUNCNAME}: [[ -d /run/systemd/system ]] -> ${ret}"
275 return ${ret}
276}

Legend:
Removed from v.1.25  
changed lines
  Added in v.1.26

  ViewVC Help
Powered by ViewVC 1.1.20