1 |
#!/bin/bash |
#!/bin/bash |
2 |
# Magellan Linux Installer Functions (mage.functions.sh) |
# Magellan Linux Installer Functions (mage.functions.sh) |
3 |
# $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/mage4.functions.sh,v 1.8 2005-10-21 14:50:13 niro Exp $ |
# $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/mage4.functions.sh,v 1.10 2005-12-01 12:38:45 niro Exp $ |
4 |
|
|
5 |
mage_setup() |
mage_setup() |
6 |
{ |
{ |
765 |
# 1=keep me # |
# 1=keep me # |
766 |
case ${retval} in |
case ${retval} in |
767 |
0) |
0) |
768 |
[[ ${VERBOSE} = on ]] && echo -e "\t<<< FILE: ${MROOT}${pathto}" |
# check if the file is config_protected |
769 |
rm "${MROOT}${pathto}" |
# ${MROOT} will automatically added if set !! |
770 |
|
is_config_protected "${pathto}" |
771 |
|
retval="$?" |
772 |
|
|
773 |
|
# 0 - not protected # |
774 |
|
# 1 - error # |
775 |
|
# 2 - protected # |
776 |
|
# 3 - protected but masked # |
777 |
|
|
778 |
|
case ${retval} in |
779 |
|
# file is not protected - delete it |
780 |
|
0|3) |
781 |
|
[[ ${VERBOSE} = on ]] && echo -e "\t<<< FILE: ${MROOT}${pathto}" |
782 |
|
rm "${MROOT}${pathto}" |
783 |
|
;; |
784 |
|
|
785 |
|
# file is protected, do not delete |
786 |
|
2) |
787 |
|
if [[ ${VERBOSE} = on ]] |
788 |
|
then |
789 |
|
echo -en "${COLRED}" |
790 |
|
echo -n "! prot " |
791 |
|
echo -en "${COLDEFAULT}" |
792 |
|
echo " === FILE: ${MROOT}${pathto}" |
793 |
|
fi |
794 |
|
;; |
795 |
|
esac |
796 |
;; |
;; |
|
|
|
797 |
1) |
1) |
798 |
[[ ${VERBOSE} = on ]] && \ |
[[ ${VERBOSE} = on ]] && \ |
799 |
echo -e "${COLRED}! mtime${COLDEFAULT} === FILE: ${MROOT}${pathto}" |
echo -e "${COLRED}! mtime${COLDEFAULT} === FILE: ${MROOT}${pathto}" |
1119 |
--continue \ |
--continue \ |
1120 |
--progress bar \ |
--progress bar \ |
1121 |
--directory-prefix=${PKGDIR} \ |
--directory-prefix=${PKGDIR} \ |
1122 |
${opt} ${mirr}/packages/${pkg} |
${opt} ${mirr}/${PACKAGES_SERVER_PATH}/${pkg} |
1123 |
if [[ $? = 0 ]] |
if [[ $? = 0 ]] |
1124 |
then |
then |
1125 |
break |
break |
1251 |
STATE="$(get_value_from_magefile STATE "$1")" |
STATE="$(get_value_from_magefile STATE "$1")" |
1252 |
|
|
1253 |
# state testing |
# state testing |
1254 |
if [[ ${USE_TESTING} = true ]] |
if [[ ${USE_TESTING} = true ]] || [[ ${MAGE_DISTRIBUTION} = testing ]] |
1255 |
then |
then |
1256 |
case ${STATE} in |
case ${STATE} in |
1257 |
testing|stable) return 0 ;; |
testing|stable) return 0 ;; |
1260 |
fi |
fi |
1261 |
|
|
1262 |
# state unstable |
# state unstable |
1263 |
if [[ ${USE_UNSTABLE} = true ]] |
if [[ ${USE_UNSTABLE} = true ]] || [[ ${MAGE_DISTRIBUTION} = unstable ]] |
1264 |
then |
then |
1265 |
case ${STATE} in |
case ${STATE} in |
1266 |
unstable|testing|stable) return 0 ;; |
unstable|testing|stable) return 0 ;; |