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

Diff of /eclass/systemd.eclass

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

Revision 1.24 Revision 1.25
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.24 2013/04/13 22:36:51 mgorny Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/systemd.eclass,v 1.25 2013/04/13 22:49:21 floppym 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
177 [[ ${#} -eq 2 ]] || die "Synopsis: systemd_enable_service target service" 177 [[ ${#} -eq 2 ]] || die "Synopsis: systemd_enable_service target service"
178 178
179 local target=${1} 179 local target=${1}
180 local service=${2} 180 local service=${2}
181 local ud=$(_systemd_get_unitdir) 181 local ud=$(_systemd_get_unitdir)
182 local destname=$(basename "${service}") 182 local destname=${service##*/}
183 183
184 dodir "${ud}"/"${target}".wants && \ 184 dodir "${ud}"/"${target}".wants && \
185 dosym ../"${service}" "${ud}"/"${target}".wants/"${destname}" 185 dosym ../"${service}" "${ud}"/"${target}".wants/"${destname}"
186} 186}
187 187

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

  ViewVC Help
Powered by ViewVC 1.1.20