1 |
# $Header: /magellan-cvs/smage/include/mtools.sminc,v 1.39 2008/04/20 08:28:23 niro Exp $ |
# $Id$ |
2 |
# some special build tools |
# some special build tools |
3 |
|
|
4 |
# automatical inherit mtools.minc |
# automatical inherit mtools.minc |
5 |
# this will provide the service management functions |
# this will provide the service management functions |
6 |
INHERITS="${INHERITS} mtools" |
INHERITS="${INHERITS} mtools" |
7 |
|
|
8 |
|
# get the pname right with splitpackages |
9 |
|
mpname() |
10 |
|
{ |
11 |
|
local pname="${PNAME}" |
12 |
|
[[ ! -z ${SPLIT_PACKAGE_BASE} ]] && pname="${SPLIT_PACKAGE_BASE}" |
13 |
|
|
14 |
|
echo "${pname}" |
15 |
|
} |
16 |
|
|
17 |
# installs initscripts |
# installs initscripts |
18 |
# minstallrc /path/to/rc-script {destfilename} |
# minstallrc /path/to/rc-script {destfilename} |
19 |
minstallrc() |
minstallrc() |
26 |
# if no fullpath given use file from sourcedir |
# if no fullpath given use file from sourcedir |
27 |
if [[ -z $(dirname $1) ]] || [[ $(dirname $1) = . ]] |
if [[ -z $(dirname $1) ]] || [[ $(dirname $1) = . ]] |
28 |
then |
then |
29 |
file="${SOURCEDIR}/${PNAME}/$1" |
file="${SOURCEDIR}/$(mpname)/$1" |
30 |
else |
else |
31 |
file="$1" |
file="$1" |
32 |
fi |
fi |
57 |
# if no fullpath given use file from sourcedir |
# if no fullpath given use file from sourcedir |
58 |
if [[ -z $(dirname $1) ]] || [[ $(dirname $1) = . ]] |
if [[ -z $(dirname $1) ]] || [[ $(dirname $1) = . ]] |
59 |
then |
then |
60 |
file="${SOURCEDIR}/${PNAME}/$1" |
file="${SOURCEDIR}/$(mpname)/$1" |
61 |
else |
else |
62 |
file="$1" |
file="$1" |
63 |
fi |
fi |
88 |
# if no fullpath given use file from sourcedir |
# if no fullpath given use file from sourcedir |
89 |
if [[ -z $(dirname $1) ]] || [[ $(dirname $1) = . ]] |
if [[ -z $(dirname $1) ]] || [[ $(dirname $1) = . ]] |
90 |
then |
then |
91 |
file="${SOURCEDIR}/${PNAME}/$1" |
file="${SOURCEDIR}/$(mpname)/$1" |
92 |
else |
else |
93 |
file="$1" |
file="$1" |
94 |
fi |
fi |
120 |
# if no fullpath given use file from sourcedir |
# if no fullpath given use file from sourcedir |
121 |
if [[ -z $(dirname $1) ]] || [[ $(dirname $1) = . ]] |
if [[ -z $(dirname $1) ]] || [[ $(dirname $1) = . ]] |
122 |
then |
then |
123 |
file="${SOURCEDIR}/${PNAME}/$1" |
file="${SOURCEDIR}/$(mpname)/$1" |
124 |
else |
else |
125 |
file="$1" |
file="$1" |
126 |
fi |
fi |
150 |
{ |
{ |
151 |
local udevrule |
local udevrule |
152 |
local file |
local file |
153 |
|
local udevrulesddir="/usr/lib/udev/rules.d" |
154 |
|
|
155 |
[[ -z "$1" ]] && die "No udev rule given" |
[[ -z "$1" ]] && die "No udev rule given" |
156 |
|
|
157 |
# if no fullpath given use file from sourcedir |
# if no fullpath given use file from sourcedir |
158 |
if [[ -z $(dirname $1) ]] || [[ $(dirname $1) = . ]] |
if [[ -z $(dirname $1) ]] || [[ $(dirname $1) = . ]] |
159 |
then |
then |
160 |
file="${SOURCEDIR}/${PNAME}/$1" |
file="${SOURCEDIR}/$(mpname)/$1" |
161 |
else |
else |
162 |
file="$1" |
file="$1" |
163 |
fi |
fi |
170 |
fi |
fi |
171 |
|
|
172 |
# needed directory |
# needed directory |
173 |
install -d ${BINDIR}/etc/udev/rules.d || die |
install -d ${BINDIR}${udevrulesddir} || die |
174 |
|
|
175 |
# install our udev rule |
# install our udev rule |
176 |
install -v -m 0644 -o root -g root ${file} ${BINDIR}/etc/udev/rules.d/${udevrule} || die |
install -v -m 0644 -o root -g root ${file} ${BINDIR}${udevrulesddir}/${udevrule} || die |
177 |
} |
} |
178 |
|
|
179 |
minstalludevhelper() |
minstalludevhelper() |
180 |
{ |
{ |
181 |
local udevhelper |
local udevhelper |
182 |
local file |
local file |
183 |
|
local udevdir="/usr/lib/udev" |
184 |
|
|
185 |
[[ -z "$1" ]] && die "No udev helper given" |
[[ -z "$1" ]] && die "No udev helper given" |
186 |
|
|
187 |
# if no fullpath given use file from sourcedir |
# if no fullpath given use file from sourcedir |
188 |
if [[ -z $(dirname $1) ]] || [[ $(dirname $1) = . ]] |
if [[ -z $(dirname $1) ]] || [[ $(dirname $1) = . ]] |
189 |
then |
then |
190 |
file="${SOURCEDIR}/${PNAME}/$1" |
file="${SOURCEDIR}/$(mpname)/$1" |
191 |
else |
else |
192 |
file="$1" |
file="$1" |
193 |
fi |
fi |
200 |
fi |
fi |
201 |
|
|
202 |
# needed directory |
# needed directory |
203 |
install -d ${BINDIR}/lib/udev || die |
install -d ${BINDIR}${udevdir} || die |
204 |
|
|
205 |
# install our udev-helper |
# install our udev-helper |
206 |
install -v -m 0755 -o root -g root ${file} ${BINDIR}/lib/udev/${udevhelper} || die |
install -v -m 0755 -o root -g root ${file} ${BINDIR}${udevdir}/${udevhelper} || die |
207 |
|
} |
208 |
|
|
209 |
|
minstallhalinformation() |
210 |
|
{ |
211 |
|
local halrule |
212 |
|
local file |
213 |
|
|
214 |
|
[[ -z "$1" ]] && die "No hal rule given" |
215 |
|
|
216 |
|
# if no fullpath given use file from sourcedir |
217 |
|
if [[ -z $(dirname $1) ]] || [[ $(dirname $1) = . ]] |
218 |
|
then |
219 |
|
file="${SOURCEDIR}/$(mpname)/$1" |
220 |
|
else |
221 |
|
file="$1" |
222 |
|
fi |
223 |
|
|
224 |
|
if [[ -n "$2" ]] |
225 |
|
then |
226 |
|
halrule="$2" |
227 |
|
else |
228 |
|
halrule="$(basename ${file})" |
229 |
|
fi |
230 |
|
|
231 |
|
# needed directory |
232 |
|
install -d ${BINDIR}/usr/share/hal/fdi/information/20thirdparty || die |
233 |
|
|
234 |
|
# install our udev rule |
235 |
|
install -v -m 0644 -o root -g root ${file} ${BINDIR}/usr/share/hal/fdi/information/20thirdparty/${halrule} || die |
236 |
|
} |
237 |
|
|
238 |
|
minstallhalpolicy() |
239 |
|
{ |
240 |
|
local halrule |
241 |
|
local file |
242 |
|
|
243 |
|
[[ -z "$1" ]] && die "No hal rule given" |
244 |
|
|
245 |
|
# if no fullpath given use file from sourcedir |
246 |
|
if [[ -z $(dirname $1) ]] || [[ $(dirname $1) = . ]] |
247 |
|
then |
248 |
|
file="${SOURCEDIR}/$(mpname)/$1" |
249 |
|
else |
250 |
|
file="$1" |
251 |
|
fi |
252 |
|
|
253 |
|
if [[ -n "$2" ]] |
254 |
|
then |
255 |
|
halrule="$2" |
256 |
|
else |
257 |
|
halrule="$(basename ${file})" |
258 |
|
fi |
259 |
|
|
260 |
|
# needed directory |
261 |
|
install -d ${BINDIR}/usr/share/hal/fdi/policy/20thirdparty || die |
262 |
|
|
263 |
|
# install our udev rule |
264 |
|
install -v -m 0644 -o root -g root ${file} ${BINDIR}/usr/share/hal/fdi/policy/20thirdparty/${halrule} || die |
265 |
|
} |
266 |
|
|
267 |
|
minstallhalpreprobe() |
268 |
|
{ |
269 |
|
local halrule |
270 |
|
local file |
271 |
|
|
272 |
|
[[ -z "$1" ]] && die "No hal rule given" |
273 |
|
|
274 |
|
# if no fullpath given use file from sourcedir |
275 |
|
if [[ -z $(dirname $1) ]] || [[ $(dirname $1) = . ]] |
276 |
|
then |
277 |
|
file="${SOURCEDIR}/$(mpname)/$1" |
278 |
|
else |
279 |
|
file="$1" |
280 |
|
fi |
281 |
|
|
282 |
|
if [[ -n "$2" ]] |
283 |
|
then |
284 |
|
halrule="$2" |
285 |
|
else |
286 |
|
halrule="$(basename ${file})" |
287 |
|
fi |
288 |
|
|
289 |
|
# needed directory |
290 |
|
install -d ${BINDIR}/usr/share/hal/fdi/preprobe/10osvendor || die |
291 |
|
|
292 |
|
# install our udev rule |
293 |
|
install -v -m 0644 -o root -g root ${file} ${BINDIR}/usr/share/hal/fdi/preprobe/10osvendor/${halrule} || die |
294 |
} |
} |
295 |
|
|
296 |
# install man files to appropiate dirs |
# install man files to appropiate dirs |
376 |
# if no fullpath given use file from sourcedir |
# if no fullpath given use file from sourcedir |
377 |
if [[ -z $(dirname $1) ]] || [[ $(dirname $1) = . ]] |
if [[ -z $(dirname $1) ]] || [[ $(dirname $1) = . ]] |
378 |
then |
then |
379 |
file="${SOURCEDIR}/${PNAME}/$1" |
file="${SOURCEDIR}/$(mpname)/$1" |
380 |
else |
else |
381 |
file="$1" |
file="$1" |
382 |
fi |
fi |
414 |
# if no fullpath given use file from sourcedir |
# if no fullpath given use file from sourcedir |
415 |
if [[ -z $(dirname $1) ]] || [[ $(dirname $1) = . ]] |
if [[ -z $(dirname $1) ]] || [[ $(dirname $1) = . ]] |
416 |
then |
then |
417 |
file="${SOURCEDIR}/${PNAME}/$1" |
file="${SOURCEDIR}/$(mpname)/$1" |
418 |
else |
else |
419 |
file="$1" |
file="$1" |
420 |
fi |
fi |
449 |
# if no fullpath given use file from sourcedir |
# if no fullpath given use file from sourcedir |
450 |
if [[ -z $(dirname $2) ]] || [[ $(dirname $2) = . ]] |
if [[ -z $(dirname $2) ]] || [[ $(dirname $2) = . ]] |
451 |
then |
then |
452 |
file="${SOURCEDIR}/${PNAME}/$2" |
file="${SOURCEDIR}/$(mpname)/$2" |
453 |
else |
else |
454 |
file="$2" |
file="$2" |
455 |
fi |
fi |
470 |
|
|
471 |
|
|
472 |
# installs logrotate configuration files |
# installs logrotate configuration files |
473 |
# minstallpam /path/to/logrotatefile {destfilename} |
# minstalllog /path/to/logrotatefile {destfilename} |
474 |
minstalllog() |
minstalllog() |
475 |
{ |
{ |
476 |
local logfile |
local logfile |
481 |
# if no fullpath given use file from sourcedir |
# if no fullpath given use file from sourcedir |
482 |
if [[ -z $(dirname $1) ]] || [[ $(dirname $1) = . ]] |
if [[ -z $(dirname $1) ]] || [[ $(dirname $1) = . ]] |
483 |
then |
then |
484 |
file="${SOURCEDIR}/${PNAME}/$1" |
file="${SOURCEDIR}/$(mpname)/$1" |
485 |
else |
else |
486 |
file="$1" |
file="$1" |
487 |
fi |
fi |
528 |
|
|
529 |
if [[ $1 = -s ]] |
if [[ $1 = -s ]] |
530 |
then |
then |
531 |
file="${SOURCEDIR}/${PNAME}/$2" |
file="${SOURCEDIR}/$(mpname)/$2" |
532 |
dest="$3" |
dest="$3" |
533 |
if [[ -z $3 ]] |
if [[ -z $3 ]] |
534 |
then |
then |
560 |
|
|
561 |
if [[ $1 = -s ]] |
if [[ $1 = -s ]] |
562 |
then |
then |
563 |
file="${SOURCEDIR}/${PNAME}/$2" |
file="${SOURCEDIR}/$(mpname)/$2" |
564 |
dest="$3" |
dest="$3" |
565 |
if [[ -z $3 ]] |
if [[ -z $3 ]] |
566 |
then |
then |
587 |
{ |
{ |
588 |
local file |
local file |
589 |
local dest |
local dest |
590 |
|
local verbose="-v" |
591 |
|
|
592 |
|
# check for busybox as it doesn't support 'ln -v' |
593 |
|
[[ $(readlink $(which ln)) = */busybox ]] && verbose="" |
594 |
|
|
595 |
[[ -z $1 ]] && die "No file given" |
[[ -z $1 ]] && die "No file given" |
596 |
|
|
597 |
if [[ $1 = -s ]] |
if [[ $1 = -s ]] |
598 |
then |
then |
599 |
file="${SOURCEDIR}/${PNAME}/$2" |
file="${SOURCEDIR}/$(mpname)/$2" |
600 |
dest="$3" |
dest="$3" |
601 |
if [[ -z $3 ]] |
if [[ -z $3 ]] |
602 |
then |
then |
616 |
# install our library |
# install our library |
617 |
install -v -m 0755 -o root -g root ${file} ${BINDIR}/${dest} || die |
install -v -m 0755 -o root -g root ${file} ${BINDIR}/${dest} || die |
618 |
|
|
619 |
# create libtool symlinks |
# prefer scanelf |
620 |
# 1. - library.so.1.0.0 -> library.so.1.0 |
if [[ -x $(type -P scanelf) ]] |
|
if [ "${file%.*}" != *.so ] |
|
621 |
then |
then |
622 |
ln -v -snf $(basename ${file}) ${BINDIR}/${dest}/$(basename ${file%.*}) |
local soname="$(scanelf -qBF '%S#p' ${file})" |
623 |
fi |
ln ${verbose} -snf $(basename ${file}) ${BINDIR}/${dest}/${soname} || die |
624 |
# 2. - library.so.1.0.0 -> library.so.1 |
else |
625 |
if [ "${file%.*.*}" != *.so ] |
echo -e "${COLYELLOW}minstalllib(): Warning: scanelf not found, using fallback symlink method${COLDEFAULT}" |
626 |
then |
|
627 |
ln -v -snf $(basename ${file}) ${BINDIR}/${dest}/$(basename ${file%.*.*}) |
# create libtool symlinks |
628 |
|
# 1. - library.so.1.0.0 -> library.so.1.0 |
629 |
|
if [ "${file%.*}" != *.so ] |
630 |
|
then |
631 |
|
ln ${verbose} -snf $(basename ${file}) ${BINDIR}/${dest}/$(basename ${file%.*}) || die |
632 |
|
fi |
633 |
|
# 2. - library.so.1.0.0 -> library.so.1 |
634 |
|
if [ "${file%.*.*}" != *.so ] |
635 |
|
then |
636 |
|
ln ${verbose} -snf $(basename ${file}) ${BINDIR}/${dest}/$(basename ${file%.*.*}) || die |
637 |
|
fi |
638 |
|
# 3. - library.so.1.0.0.0 -> library.so.1 |
639 |
|
if [ "${file%.*.*.*}" != *.so ] |
640 |
|
then |
641 |
|
ln ${verbose} -snf $(basename ${file}) ${BINDIR}/${dest}/$(basename ${file%.*.*.*}) || die |
642 |
|
fi |
643 |
fi |
fi |
644 |
} |
} |
645 |
|
|
652 |
# recursive |
# recursive |
653 |
if [[ $1 = -r ]] || [[ $1 = -R ]] |
if [[ $1 = -r ]] || [[ $1 = -R ]] |
654 |
then |
then |
655 |
opts="--recursive" |
opts="-R" |
656 |
source="$2" |
source="$2" |
657 |
dest="$3" |
dest="$3" |
658 |
fi |
fi |
660 |
# recursive |
# recursive |
661 |
if [[ $1 = -rf ]] || [[ $1 = -fr ]] || [[ $1 = -Rf ]] || [[ $1 = -fR ]] |
if [[ $1 = -rf ]] || [[ $1 = -fr ]] || [[ $1 = -Rf ]] || [[ $1 = -fR ]] |
662 |
then |
then |
663 |
opts="--recursive --force" |
opts="-R -f" |
664 |
|
source="$2" |
665 |
|
dest="$3" |
666 |
|
fi |
667 |
|
|
668 |
|
if [[ $1 = -a ]] |
669 |
|
then |
670 |
|
opts="-a" |
671 |
source="$2" |
source="$2" |
672 |
dest="$3" |
dest="$3" |
673 |
fi |
fi |
678 |
cp -v ${opts} ${source} ${BINDIR}/${dest} || die |
cp -v ${opts} ${source} ${BINDIR}/${dest} || die |
679 |
} |
} |
680 |
|
|
681 |
|
mdelete() |
682 |
|
{ |
683 |
|
local dest="$1" |
684 |
|
local opts |
685 |
|
|
686 |
|
# recursive |
687 |
|
if [[ $1 = -r ]] || [[ $1 = -R ]] |
688 |
|
then |
689 |
|
opts="-r" |
690 |
|
dest="$2" |
691 |
|
fi |
692 |
|
|
693 |
|
# recursive |
694 |
|
if [[ $1 = -rf ]] || [[ $1 = -fr ]] || [[ $1 = -Rf ]] || [[ $1 = -fR ]] |
695 |
|
then |
696 |
|
opts="-r -f" |
697 |
|
dest="$2" |
698 |
|
fi |
699 |
|
|
700 |
|
[[ -z ${dest} ]] && die "No dest given." |
701 |
|
[[ ! -e ${BINDIR}/${dest} ]] && die "${BINDIR}/${dest} does not exist." |
702 |
|
|
703 |
|
rm -v ${opts} ${BINDIR}/${dest} || die |
704 |
|
} |
705 |
|
|
706 |
mmove() |
mmove() |
707 |
{ |
{ |
708 |
local source="$1" |
local source="$1" |
712 |
# force |
# force |
713 |
if [[ $1 = -f ]] |
if [[ $1 = -f ]] |
714 |
then |
then |
715 |
opts="--recursive" |
opts="-f" |
716 |
source="$2" |
source="$2" |
717 |
dest="$3" |
dest="$3" |
718 |
fi |
fi |
758 |
# recursive |
# recursive |
759 |
if [[ $1 = -r ]] || [[ $1 = -R ]] |
if [[ $1 = -r ]] || [[ $1 = -R ]] |
760 |
then |
then |
761 |
local recursive="--recursive" |
local recursive="-R" |
762 |
local owner="$2" |
local owner="$2" |
763 |
local path="$3" |
local path="$3" |
764 |
fi |
fi |
778 |
# recursive |
# recursive |
779 |
if [[ $1 = -r ]] || [[ $1 = -R ]] |
if [[ $1 = -r ]] || [[ $1 = -R ]] |
780 |
then |
then |
781 |
local recursive="--recursive" |
local recursive="-R" |
782 |
local posix="$2" |
local posix="$2" |
783 |
local path="$3" |
local path="$3" |
784 |
fi |
fi |
793 |
{ |
{ |
794 |
local symlink="$1" |
local symlink="$1" |
795 |
local pathto="$2" |
local pathto="$2" |
796 |
|
local verbose="-v" |
797 |
|
|
798 |
|
# check for busybox as it doesn'tz support 'ln -v' |
799 |
|
[[ $(readlink $(which ln)) = */busybox ]] && verbose="" |
800 |
|
|
801 |
[[ -z ${symlink} ]] && die "No symlink given." |
[[ -z ${symlink} ]] && die "No symlink given." |
802 |
[[ -z ${pathto} ]] && die "No path given." |
[[ -z ${pathto} ]] && die "No path given." |
803 |
|
|
804 |
ln -v -snf ${symlink} ${BINDIR}/${pathto} || die |
ln ${verbose} -snf ${symlink} ${BINDIR}/${pathto} || die |
805 |
|
} |
806 |
|
|
807 |
|
# installs systemd units |
808 |
|
# minstallunit /path/to/unit-file {destfilename} |
809 |
|
minstallunit() |
810 |
|
{ |
811 |
|
local unit |
812 |
|
local file |
813 |
|
local systemdunitdir="/usr/lib/systemd/system" |
814 |
|
|
815 |
|
[[ -z "$1" ]] && die "No unit given" |
816 |
|
|
817 |
|
# if no fullpath given use file from sourcedir |
818 |
|
if [[ -z $(dirname $1) ]] || [[ $(dirname $1) = . ]] |
819 |
|
then |
820 |
|
file="${SOURCEDIR}/$(mpname)/$1" |
821 |
|
else |
822 |
|
file="$1" |
823 |
|
fi |
824 |
|
|
825 |
|
if [[ -n "$2" ]] |
826 |
|
then |
827 |
|
unit="$2" |
828 |
|
else |
829 |
|
unit="$(basename ${file})" |
830 |
|
fi |
831 |
|
|
832 |
|
# needed directory |
833 |
|
install -d ${BINDIR}${prefix}${systemdunitdir} || die |
834 |
|
|
835 |
|
# install our initscript |
836 |
|
install -v -m 0644 -o root -g root ${file} ${BINDIR}${prefix}${systemdunitdir}/${unit} || die |
837 |
|
} |
838 |
|
|
839 |
|
# installs systemd tmp configs to /etc/tmpfiles.d |
840 |
|
# minstalltmp /path/to/tmpdfile {destfilename} |
841 |
|
minstalltmp() |
842 |
|
{ |
843 |
|
local tmpdfile |
844 |
|
local file |
845 |
|
|
846 |
|
[[ -z "$1" ]] && die "No tmpd file given" |
847 |
|
|
848 |
|
# if no fullpath given use file from sourcedir |
849 |
|
if [[ -z $(dirname $1) ]] || [[ $(dirname $1) = . ]] |
850 |
|
then |
851 |
|
file="${SOURCEDIR}/$(mpname)/$1" |
852 |
|
else |
853 |
|
file="$1" |
854 |
|
fi |
855 |
|
|
856 |
|
if [[ -n "$2" ]] |
857 |
|
then |
858 |
|
tmpdfile="$2" |
859 |
|
else |
860 |
|
tmpdfile="$(basename ${file})" |
861 |
|
fi |
862 |
|
|
863 |
|
# needed directory |
864 |
|
install -d ${BINDIR}/etc/tmpfiles.d || die |
865 |
|
|
866 |
|
# install our tmpdfile |
867 |
|
install -v -m 0644 -o root -g root ${file} ${BINDIR}/etc/tmpfiles.d/${tmpdfile} || die |
868 |
|
} |
869 |
|
|
870 |
|
mclearconfig() |
871 |
|
{ |
872 |
|
local confdir |
873 |
|
local prefix="${BINDIR}" |
874 |
|
[[ -z ${MCONFIG} ]] && die "No \$MCONFIG given!" |
875 |
|
|
876 |
|
# no bindir prefix if requested |
877 |
|
case $1 in |
878 |
|
-b|--no-bindir) prefix="";; |
879 |
|
esac |
880 |
|
|
881 |
|
confdir="$(dirname ${MCONFIG})" |
882 |
|
if [[ ! -d ${prefix}/${confdir} ]] |
883 |
|
then |
884 |
|
install -d ${prefix}/${confdir} || die |
885 |
|
fi |
886 |
|
: > ${prefix}/${MCONFIG} |
887 |
|
} |
888 |
|
|
889 |
|
maddconfig() |
890 |
|
{ |
891 |
|
local argv="$1" |
892 |
|
local confdir |
893 |
|
local prefix="${BINDIR}" |
894 |
|
|
895 |
|
[[ -z ${MCONFIG} ]] && die "No \$MCONFIG given!" |
896 |
|
|
897 |
|
# no bindir prefix if requested |
898 |
|
case $1 in |
899 |
|
-b|--no-bindir) prefix=""; argv="$2" ;; |
900 |
|
esac |
901 |
|
|
902 |
|
[[ -z ${argv} ]] && die "No argument given!" |
903 |
|
|
904 |
|
confdir="$(dirname ${MCONFIG})" |
905 |
|
if [[ ! -d ${prefix}/${confdir} ]] |
906 |
|
then |
907 |
|
install -d ${prefix}/${confdir} || die |
908 |
|
fi |
909 |
|
echo "${argv}" >> ${prefix}/${MCONFIG} || die |
910 |
} |
} |