# funkcija utrpa ispravan sources.list
create_sources_list () {
- [ -f /etc/apt/sources.list -a ! -f /etc/apt/sources.list.cn3-upgrade ] && mv /etc/apt/sources.list /etc/apt/sources.list.cn3-upgrade
+ [ -f /etc/apt/sources.list -a ! -f /etc/apt/sources.list.cn4-upgrade ] && mv /etc/apt/sources.list /etc/apt/sources.list.cn4-upgrade
cp /usr/share/carnet-upgrade/files/etc/apt/sources.list /etc/apt
notice "Novi sadrzaj datoteke /etc/apt/sources.list:
# backup_slapd_db
backup_slapd_db () {
- local ldap_backup=/var/backups/slapcat.cn3-upgrade
+ local ldap_backup=/var/backups/slapcat.cn4-upgrade
if [ ! -f $ldap_backup ]; then
[ -x /etc/init.d/freeradius ] && /etc/init.d/freeradius stop || true
# backup etc direktorija
backup_etc_dir () {
- local etc_backup=/var/backups/etc.cn3-upgrade.tar.gz
+ local etc_backup=/var/backups/etc.cn4-upgrade.tar.gz
if [ ! -f $etc_backup ]; then
if tar cfz $etc_backup /etc 2> /dev/null; then
# fixaj /etc/default/raid2
fix_etc_default_raid2 () {
if [ -f /etc/default/raid2 ]; then
- sed "s/^AUTOSTART.*/AUTOSTART=true/g" /etc/default/raid2 > /etc/default/raid2.cn3-upgrade.$$
- chown --reference=/etc/default/raid2 /etc/default/raid2.cn3-upgrade.$$
- chmod --reference=/etc/default/raid2 /etc/default/raid2.cn3-upgrade.$$
+ sed "s/^AUTOSTART.*/AUTOSTART=true/g" /etc/default/raid2 > /etc/default/raid2.cn4-upgrade.$$
+ chown --reference=/etc/default/raid2 /etc/default/raid2.cn4-upgrade.$$
+ chmod --reference=/etc/default/raid2 /etc/default/raid2.cn4-upgrade.$$
- if ! cmp -s /etc/default/raid2.cn3-upgrade.$$ /etc/default/raid2; then
+ if ! cmp -s /etc/default/raid2.cn4-upgrade.$$ /etc/default/raid2; then
log "Fixed /etc/default/raid2 AUTOSTART option."
- mv /etc/default/raid2.cn3-upgrade.$$ /etc/default/raid2
+ mv /etc/default/raid2.cn4-upgrade.$$ /etc/default/raid2
else
- rm /etc/default/raid2.cn3-upgrade.$$
+ rm /etc/default/raid2.cn4-upgrade.$$
fi
fi
}
local file file_backup
for file in "$@"; do
- file_backup=$file.cn3-upgrade
+ file_backup=$file.cn4-upgrade
if [ -e $file -a ! -e $file_backup ]; then
# backup file
mv $file $file_backup
# aide switched to ucf, move old configs aside
for file in /etc/aide/aide.conf /etc/cron.daily/aide /etc/default/aide; do
- [ ! -e "$file.cn3-upgrade" ] && mv "$file" "$file.cn3-upgrade"
+ [ ! -e "$file.cn4-upgrade" ] && mv "$file" "$file.cn4-upgrade"
rm -f "$file"
done
}
# move old config aside
local conf=/etc/amavis/amavisd.conf
- if [ -e $conf -a ! -e $conf.cn3-upgrade ]; then
- mv $conf $conf.cn3-upgrade
+ if [ -e $conf -a ! -e $conf.cn4-upgrade ]; then
+ mv $conf $conf.cn4-upgrade
fi
pkgadd amavisd-cn amavisd-new
fi
if [ -f $conf -a -f $tmpl ] && \
! cmp -s $conf $tmpl; then
- mv $conf $conf.cn3-upgrade
+ mv $conf $conf.cn4-upgrade
mv_in_sasl=1
fi
if [ -f $confdir/Sendmail.conf ]; then
- mv $confdir/Sendmail.conf $confdir/Sendmail.conf.cn3-upgrade
+ mv $confdir/Sendmail.conf $confdir/Sendmail.conf.cn4-upgrade
mv_in_sasl=1
fi
if [ -f $confdir/sasl.m4 ] && \
! cmp -s $confdir/sasl.m4 $tmpldir/sasl.m4; then
- mv -f $confdir/sasl.m4 $confdir/sasl.m4.cn3-upgrade
+ mv -f $confdir/sasl.m4 $confdir/sasl.m4.cn4-upgrade
mv_in_sasl=1
fi
[ "$mv_in_sasl" ] && \