Magellan Linux

Diff of /branches/R11-unstable/include/mtools.sminc

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

branches/magellan-next/include/mtools.sminc revision 8642 by niro, Wed Jul 27 11:09:50 2011 UTC trunk/include/mtools.sminc revision 10935 by niro, Sun Feb 5 14:10:16 2012 UTC
# Line 14  mpname() Line 14  mpname()
14   echo "${pname}"   echo "${pname}"
15  }  }
16    
 # get the bindir right with splitpackages  
 mbindir()  
 {  
  echo "${BINDIR}"  
 }  
   
17  # installs initscripts  # installs initscripts
18  # minstallrc /path/to/rc-script {destfilename}  # minstallrc /path/to/rc-script {destfilename}
19  minstallrc()  minstallrc()
# Line 474  minstallcron() Line 468  minstallcron()
468    
469    
470  # installs logrotate configuration files  # installs logrotate configuration files
471  # minstallpam /path/to/logrotatefile {destfilename}  # minstalllog /path/to/logrotatefile {destfilename}
472  minstalllog()  minstalllog()
473  {  {
474   local logfile   local logfile
# Line 655  mcopy() Line 649  mcopy()
649   dest="$3"   dest="$3"
650   fi   fi
651    
652     if [[ $1 = -a ]]
653     then
654     opts="--archive"
655     source="$2"
656     dest="$3"
657     fi
658    
659   [[ -z ${source} ]] && die "No source given."   [[ -z ${source} ]] && die "No source given."
660   [[ -z ${dest} ]] && die "No dest given."   [[ -z ${dest} ]] && die "No dest given."
661    
# Line 768  minstallunit() Line 769  minstallunit()
769  {  {
770   local unit   local unit
771   local file   local file
772     local prefix
773    
774   [[ -z "$1" ]] && die "No unit given"   [[ -z "$1" ]] && die "No unit given"
775    
776     # get the right prefix for newer systemd
777     [[ -x /bin/systemctl ]] && prefix=""
778     [[ -x /usr/bin/systemctl ]] && prefix="/usr"
779    
780   # if no fullpath given use file from sourcedir   # if no fullpath given use file from sourcedir
781   if [[ -z $(dirname $1) ]] || [[ $(dirname $1) = . ]]   if [[ -z $(dirname $1) ]] || [[ $(dirname $1) = . ]]
782   then   then
# Line 787  minstallunit() Line 793  minstallunit()
793   fi   fi
794    
795   # needed directory   # needed directory
796   install -d ${BINDIR}/lib/systemd/system || die   install -d ${BINDIR}${prefix}/lib/systemd/system || die
797    
798   # install our initscript   # install our initscript
799   install -v -m 0644 -o root -g root ${file} ${BINDIR}/lib/systemd/system/${unit} || die   install -v -m 0644 -o root -g root ${file} ${BINDIR}${prefix}/lib/systemd/system/${unit} || die
800  }  }
801    
802  # installs systemd tmp configs to /etc/tmpfiles.d  # installs systemd tmp configs to /etc/tmpfiles.d

Legend:
Removed from v.8642  
changed lines
  Added in v.10935