[CentOS] smartd.conf get overridden

Udo centos at open-pla.net
Thu Dec 6 12:36:51 UTC 2007


Am Donnerstag, den 06.12.2007, 02:20 -0800 schrieb Christian Volker:
> Yohoo!
> 
> I have some issues with the smartd in CentOS5/x64
> I edited the /etc/smartd.conf for my needs and restarted the smartd with
> "service smartd restart". But the start script is overriding my file. I
> checked it and saw the following lines:
> 
> ---------------/etc/init.d/smartd------------
> case "$1" in
>     start | reload | restart)
> GEN_CONF="*SMARTD*AUTOGENERATED*"
> [ ! -f /etc/smartd.conf ] || read DUMMY GEN_CONF DUMMY </etc/smartd.conf \
> && [ "$GEN_CONF" == "*SMARTD*AUTOGENERATED*" ] \
> && smartd-conf.py 2>/dev/null >/etc/smartd.conf.new-autogenerated \
> && mv -f /etc/smartd.conf.new-autogenerated /etc/smartd.conf
>     ;;
> esac
> ---------------/etc/init.d/smartd------------
> 
> So how can I prevent my file beeeing overriden without editing this script
> (which will probably get lots the next update)?
> 
> ------/etc/sysctl/smartmontools---------
> # command line options for smartd
> smartd_opts="-q never"
> ----------------------------------------
> 
> Any ideas?
> 
> Christian Volker
> 
> Technical Support Engineer

Hello,

the first three lines of my /etc/smartd.conf are:
"# *SMARTD*AUTOGENERATED* /etc/smartd.conf
# Remove the line above if you have edited the file and you do not want
# it to be overwritten on the next smartd startup."

Udo







More information about the CentOS mailing list