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.9 2005-10-21 16:01:40 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}" |