Hello community, here is the log from the commit of package smartmontools checked in at Wed Dec 3 16:41:10 CET 2008. -------- --- smartmontools/smartmontools.changes 2008-10-27 18:50:44.000000000 +0100 +++ /mounts/work_src_done/STABLE/smartmontools/smartmontools.changes 2008-11-27 14:35:38.000000000 +0100 @@ -1,0 +2,5 @@ +Thu Nov 27 14:35:11 CET 2008 - sbrabec@suse.cz + +- smartd_opts migrated to sysconfig (bnc#448205). + +------------------------------------------------------------------- calling whatdependson for head-i586 New: ---- smartmontools.sysconfig smartmontools-sysconfig.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ smartmontools.spec ++++++ --- /var/tmp/diff_new_pack.UA3391/_old 2008-12-03 16:40:48.000000000 +0100 +++ /var/tmp/diff_new_pack.UA3391/_new 2008-12-03 16:40:48.000000000 +0100 @@ -22,15 +22,17 @@ License: GPL v2 or later Group: Hardware/Other Version: 5.38.0.20081027 -Release: 1 +Release: 2 #Source: %{name}-%{version}.tar.bz2 Source: sm5-20081027.tar.bz2 Source1: README.SATA +Source2: smartmontools.sysconfig Patch: smartmontools-powersave-notify.patch Patch1: smartmontools-default-enabled.patch Patch2: smartmontools-lsb-init-script.patch Patch4: smartmontools-removable.patch Patch5: smartmontools-init-update.patch +Patch6: smartmontools-sysconfig.patch PreReq: %insserv_prereq %fillup_prereq coreutils %if %suse_version > 1000 %if %suse_version <= 1100 @@ -72,6 +74,7 @@ %prep %setup -q -n sm5 cp -a %{S:1} . +cp -a %{S:2} . %if %suse_version >= 1010 %patch1 %endif @@ -84,6 +87,7 @@ %endif %endif %patch5 +%patch6 %build ./autogen.sh @@ -115,8 +119,8 @@ chmod +x $RPM_BUILD_ROOT%{_prefix}/lib/smartmontools/smart-notify %endif %endif -mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/default -echo '#smartd_opts=""' >$RPM_BUILD_ROOT%{_sysconfdir}/default/smartmontools +mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates +cp smartmontools.sysconfig $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.smartmontools %if %suse_version < 1010 cp README.SATA $RPM_BUILD_ROOT%{_datadir}/doc/packages/%{name}/ %endif @@ -141,13 +145,95 @@ fi %post +# Migrate %{_sysconfdir}/default/smartmontools to sysconfig (<=11.0,>=10.2,upstream) +#BEGIN smartd_opts_migrate +# generated by genopts +function optarg_parse() +{ + OPTARG_INTERVAL=false + OPTARG_LOGFACILITY=false + until [ $# -eq 0 ] + do + case "$1" in + --interval ) + shift + OPTARG_INTERVAL=true + OPTVAL_INTERVAL="$1" + ;; + --interval=* ) + OPTARG_INTERVAL=true + OPTVAL_INTERVAL="${1#--interval=}" + ;; + --logfacility ) + shift + OPTARG_LOGFACILITY=true + OPTVAL_LOGFACILITY="$1" + ;; + --logfacility=* ) + OPTARG_LOGFACILITY=true + OPTVAL_LOGFACILITY="${1#--logfacility=}" + ;; + -* ) + OPTTMP="${1:1}" + until [[ -z "$OPTTMP" ]] + do + case "${OPTTMP:0:1}" in + i ) + OPTARG_INTERVAL=true + OPTVAL_INTERVAL="${OPTTMP:1}" + if [[ -z "$OPTVAL_INTERVAL" ]] + then + shift + OPTVAL_INTERVAL="$1" + else + break + fi + ;; + l ) + OPTARG_LOGFACILITY=true + OPTVAL_LOGFACILITY="${OPTTMP:1}" + if [[ -z "$OPTVAL_LOGFACILITY" ]] + then + shift + OPTVAL_LOGFACILITY="$1" + else + break + fi + ;; + esac + OPTTMP="${OPTTMP:1}" + done + ;; + * ) + ARGV=("${ARGV[@]}" "$1") + ;; + esac + shift + done +} +if test -f %{_sysconfdir}/default/smartmontools -a \! -f %{_sysconfdir}/sysconfig/smartmontools ; then + . %{_sysconfdir}/default/smartmontools + optarg_parse $smartd_opts + EXPR= + if $OPTARG_INTERVAL ; then + echo "SMARTD_CHECK_INTERVAL=\"$OPTVAL_INTERVAL\"" >>%{_sysconfdir}/sysconfig/smartmontools + EXPR="s/=\"1800\"/=\"$OPTVAL_INTERVAL\"/;" + fi + if $OPTARG_LOGFACILITY ; then + echo "SMARTD_LOG_FACILITY=\"$OPTVAL_LOGFACILITY\"" >>%{_sysconfdir}/sysconfig/smartmontools + EXPR="${EXPR}s/=\"daemon\"/=\"$OPTVAL_LOGFACILITY\"/;" + fi + sed "$EXPR" %{_sysconfdir}/sysconfig/smartmontools + rm %{_sysconfdir}/default/smartmontools +fi +#END smartd_opts_migrate %if %suse_version < 1010 # With some broken drivers in older kernels, smartd can hang the system. # Don't start it by default. -%{fillup_and_insserv -f smartd} +%{fillup_and_insserv smartd} %else # Turn smartd on by default. -%{fillup_and_insserv -f -Y smartd} +%{fillup_and_insserv -Y smartd} %endif # Older SuSE versions (<=10.2) don't do restart on update. Do it now. if test -f var/adm/smartd_needs_restart ; then @@ -174,12 +260,14 @@ %endif %endif %{_sbindir}/* -%config(noreplace) %{_sysconfdir}/default/* %{_sysconfdir}/init.d/* %config(noreplace) %{_sysconfdir}/smart_drivedb.h %config(noreplace) %{_sysconfdir}/smartd.conf +/var/adm/fillup-templates/sysconfig.* %changelog +* Thu Nov 27 2008 sbrabec@suse.cz +- smartd_opts migrated to sysconfig (bnc#448205). * Fri Oct 24 2008 sbrabec@suse.cz - Updated to the latest CVS snapshot: * DEVICESCAN works again with SATA (bnc#436567) ++++++ smartmontools.sysconfig ++++++ ## Path: Hardware/S.M.A.R.T. ## Description: Hard disc health monitoring ## ServiceReload: smartd ## Type: integer(10:) ## Default: 1800 # # Interval between disk checks in seconds # SMARTD_CHECK_INTERVAL="1800" ## Type: list(local0,local1,local2,local3,local4,local5,local6,local7,daemon) ## Default: daemon # # Syslog facility used to log messages from smartd # SMARTD_LOG_FACILITY="daemon" ## Type: string ## Default: # # Read and replace drive database from specified file instead of # system files. Prepend "+" to read and add drive database from # specified file. # SMARTD_DRIVEDB="" ++++++ smartmontools-sysconfig.patch ++++++ --- smartd.initd.in +++ smartd.initd.in @@ -141,8 +141,18 @@ # Existence of config file is optional SMARTD_CONFIG=/etc/smartd.conf -# source configuration file. This should set the shell variable smartd_opts - [ -r /etc/default/smartmontools ] && . /etc/default/smartmontools + # source configuration file. + [ -r /etc/sysconfig/smartmontools ] && . /etc/sysconfig/smartmontools + smartd_opts= + if test -n "$SMARTD_CHECK_INTERVAL" -a "$SMARTD_CHECK_INTERVAL" != 1800 ; then + smartd_opts=" -i $SMARTD_CHECK_INTERVAL" + fi + if test -n "$SMARTD_LOG_FACILITY" -a "$SMARTD_LOG_FACILITY" != "daemon" ; then + smartd_opts="$smartd_opts -l $SMARTD_LOG_FACILITY" + fi + if test -n "$SMARTD_DRIVEDB" ; then + smartd_opts="$smartd_opts -B $SMARTD_DRIVEDB" + fi # Shell functions sourced from /etc/rc.status: # rc_check check and set local and overall rc status @@ -185,7 +195,7 @@ # We don't use startproc - we need to check for return code 17. if ! /sbin/checkproc $SMARTD_BIN ; then - $SMARTD_BIN $smartd_opts + $SMARTD_BIN$smartd_opts # Remember status and be verbose if test $? -ne 17 ; then rc_status -v ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org