Changeset 8a3e12a


Ignore:
Timestamp:
10/07/13 09:57:48 (15 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, 9.2-release, releng/10.0, releng/10.0.1, releng/10.0.2, releng/10.0.3, releng/10.1
Children:
44335dc
Parents:
7429809
Message:

Update pbi-manager10, now we add rc.d wrappers and will create
links in /usr/pbi/etc/rc.d for them.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • .gitignore

    r1b89eeb r8a3e12a  
    995995src-sh/pbi-manager/wrapper/pbiwrapper 
    996996src-sh/pbi-manager10/wrapper/.pbiwrapper 
     997src-sh/pbi-manager10/mount_nullfs/mount_nullfs 
     998src-sh/pbi-manager10/pbime/pbime 
     999 
  • src-sh/pbi-manager10/pbi-manager

    r9d437ac r8a3e12a  
    917917                 *) 
    918918                        if [ $# -gt 1 ]; then usage_add_pbi; fi 
    919                         if [ ! -e "${1}" -a -z "$PBI_REMOTEFETCH" ] ; then 
    920                                 exit_err "PBI file not found: (${1})" 
    921                         fi 
     919                        # If there is no file, try fetching from repo 
     920                        if [ ! -e "${1}" ] ; then PBI_REMOTEFETCH="YES"; fi 
    922921                        PBI_FILENAME="$1" 
    923922                        ;; 
     
    14211420        PBI_DELETENAME="" 
    14221421        PBI_FAKEBIN_DIR="bin" 
     1422        PBI_FAKERC_DIR="rc.d" 
    14231423        PBI_FILENAME="" 
    14241424        PBI_FORCEADD="NO" 
     
    15311531 
    15321532        export PBI_PROGNAME PBI_PROGDIRNAME PBI_PROGDIRPATH PBI_PROGVERSION PBI_RCDIR  
    1533         export SYS_LOCALBASE PBI_FAKEBIN_DIR 
     1533        export SYS_LOCALBASE PBI_FAKEBIN_DIR PBI_FAKERC_DIR 
    15341534} 
    15351535 
     
    36503650 
    36513651        # Make sure we also set SYS_LOCALBASE in case user runs these stand-alone at some point 
    3652         echo "if [ -z \"\$SYS_LOCALBASE\" ]; then SYS_LOCALBASE=\"${SYS_LOCALBASE}\" ; fi" >"${dir}/${PBI_INS_PATHSCRIPT}" 
    3653         echo "if [ -z \"\$SYS_LOCALBASE\" ]; then SYS_LOCALBASE=\"${SYS_LOCALBASE}\" ; fi" >"${dir}/${PBI_UNINS_PATHSCRIPT}" 
     3652        echo "if [ -z \"\$SYS_LOCALBASE\" ]; then SYS_LOCALBASE=\"${SYS_LOCALBASE}\" ; fi" >>"${dir}/${PBI_INS_PATHSCRIPT}" 
     3653        echo "if [ -z \"\$SYS_LOCALBASE\" ]; then SYS_LOCALBASE=\"${SYS_LOCALBASE}\" ; fi" >>"${dir}/${PBI_UNINS_PATHSCRIPT}" 
     3654        echo "if [ -z \"\$PBI_RCDIR\" ]; then PBI_RCDIR=\"${PBI_RCDIR}\" ; fi" >>"${dir}/${PBI_INS_PATHSCRIPT}" 
     3655        echo "if [ -z \"\$PBI_RCDIR\" ]; then PBI_RCDIR=\"${PBI_RCDIR}\" ; fi" >>"${dir}/${PBI_UNINS_PATHSCRIPT}" 
    36543656 
    36553657        touch "$_tmpextf" 
     
    37533755mk_path_wrappers() { 
    37543756        dir="${PBI_STAGEDIRMNT}/${PBI_FAKEBIN_DIR}" 
     3757        rcdir="${PBI_STAGEDIRMNT}/${PBI_FAKERC_DIR}" 
    37553758        if [ ! -d "${dir}" ] ; then mkdir -p "${dir}" ; fi 
    37563759 
     
    37683771        fi 
    37693772 
     3773        # If this is an rc.d script, add it to the PBI_RCDIR 
     3774        if [ "`dirname $tar`" = "etc/rc.d" ] ; then 
     3775                echo "ln -fs $PBI_PROGDIRPATH/${PBI_FAKERC_DIR}/${fbin} \$PBI_RCDIR/`basename ${tar}`" \ 
     3776                        >> "${dir}/${PBI_INS_PATHSCRIPT}" 
     3777 
     3778                # Copy the wrapper binary 
     3779                PBI_WRAPPERFILE="/.pbiwrapper-$ARCH" 
     3780                cp ${PBI_WRAPPERFILE} ${rcdir}/${fbin} 
     3781                chmod 755 ${rcdir}/${fbin} 
     3782 
     3783                # Create the wrapper .pbiopt 
     3784                echo "PROGDIR: ${PBI_PROGDIRPATH}" >${rcdir}/${fbin}.pbiopt 
     3785                echo "TARGET: ${bin}" >>${rcdir}/${fbin}.pbiopt 
     3786                return 
     3787        fi 
     3788 
    37703789        # Make our link to the system localbase if its not a wrapper only 
    37713790        if [ "$onlywrap" != "YES" ] ; then       
     
    37733792                        >> "${dir}/${PBI_INS_PATHSCRIPT}" 
    37743793        fi 
     3794 
    37753795 
    37763796        # Copy the wrapper binary 
     
    39433963        echo "Creating install script..." 
    39443964        if [ ! -d "${PBI_STAGEDIRMNT}/${PBI_FAKEBIN_DIR}" ] ; then mkdir -p "${PBI_STAGEDIRMNT}/${PBI_FAKEBIN_DIR}" ; fi 
     3965        if [ ! -d "${PBI_STAGEDIRMNT}/${PBI_FAKERC_DIR}" ] ; then mkdir -p "${PBI_STAGEDIRMNT}/${PBI_FAKERC_DIR}" ; fi 
    39453966        insc="${PBI_STAGEDIRMNT}/${PBI_FAKEBIN_DIR}/.pbi-install.sh" 
    39463967        echo "#!/bin/sh" > "$insc" 
     
    40214042        mkdir -p ${PBI_STAGEDIR}/local 
    40224043        mkdir -p ${PBI_STAGEDIR}/etc 
     4044        mkdir -p ${PBI_STAGEDIR}/rc.d 
    40234045        mkdir -p ${PBI_STAGEDIR}/pbimeta 
    40244046        mkdir -p ${PBI_STAGEDIR}/virtbase 
     
    40824104# See if we need to clean the stagedir 
    40834105clean_stage_dir() { 
    4084  
    4085         if [ -e "${PBI_STAGEDIR}/etc" ] ; then 
    4086                 mv ${PBI_STAGEDIR}/etc/* ${PBI_STAGEDIRMNT}/etc/ 
    4087         fi 
    40884106 
    40894107        if [ "${PBI_USESYSGL}" != "NO" ] ; then 
     
    72097227 
    72107228                # See if this is executable and set it as binary 
    7211                 dirname ${f} | grep -e "bin" -e "sbin" >/dev/null 2>/dev/null 
     7229                dirname ${f} | grep -e "bin" -e "sbin" -e "rc.d" >/dev/null 2>/dev/null 
    72127230                if [ -x "/usr/local/${f}" -a $? -eq 0 ] ; then 
    72137231 
  • src-sh/pbi-manager10/pbime/pbimount

    r1934da2 r8a3e12a  
    4141   is_mounted "${pDir}/virtbase/usr/local" || $NULLFS ${1}/local ${pDir}/virtbase/usr/local 
    4242   is_mounted "${pDir}/virtbase/var/run" || mount -t unionfs -o noatime ${pDir}/run ${pDir}/virtbase/var/run 
    43    is_mounted "${pDir}/virtbase/usr/local/etc" || $NULLFS ${1}/etc ${pDir}/virtbase/usr/local/etc 
     43   is_mounted "${pDir}/virtbase/usr/local/etc" || mount -t unionfs -o noatime ${1}/etc ${pDir}/virtbase/usr/local/etc 
    4444   is_mounted "${pDir}/virtbase/compat/linux" || $NULLFS ${1}/linux ${pDir}/virtbase/compat/linux 
    4545   if [ -d "${pDir}/virtbase/usr/local/etc/fonts" ] ; then 
Note: See TracChangeset for help on using the changeset viewer.