when using vim to edit modules and rc scripts, it can create (depending on the vim configuration) backup files ending with a "~" letter. So when editing files in /etc/modules.d/ or /etc/init.d/ with vim, it can create new files that shouldn't be used for the modules or rc dependencies. for exemple, for files in /etc/modules.d, if you edit /etc/modules.d/i386 and save it with vim, it create an "/etc/modules.d/i386~". The problem is when modules-update is run, it write /etc/modules.d/i386 and /etc/modules.d/i386~ in the /etc/modules.conf, whereas you intended to only write the i386 file, and not i386~, which can produce errors for futur boots. suggested fix : in /usr/sbin/update-modules, line 88 near the end of the file, add a line like : [ -z "${cfg##*~}" ] && continue diff : --------------------------------------------- ... for cfg in ${MODDIR}/* $CONF ; do [ ! -r "$cfg" ] && continue + [ -z "${cfg##*~}" ] && continue echo "### update-modules: start processing $cfg" >> $TMPFILE if [ -x $cfg ]; then ... --------------------------------------------- the problem is quite the same for rc-update : it create useless dependencies in /mnt/.init.d/ because backup files are also concidered. suggested fix : in /sbin/depscan.sh, for the function check_rcscript(), add at line 117 : [ -z "${1##*~}" ] && return 1 diff : ----------------------------------------- [ "${1##*.}" = "sh" ] && return 1 [ "${1##*.}" = "c" ] && return 1 + [ -z "${1##*~}" ] && return 1 local IFS='!' ----------------------------------------- hoppe this will help for all "vim addicted" users (yes, i should use nano, but nobody is perfect). for any suggestion : sart@host.sk Stephane
so my bug repport invalid ? Could someone please tell me why in just a few words ? Do you think vim backup files should be used exactly like others ? or is it too specific for a particular vim setup ? sorry if i made you lose a little time with this repport.
in a few words : if you use vim 6.1 with the exemple rc file : /usr/share/vim/vim61/vimrc_example.vim to edit /etc/modules.d/i386 for exemple, your /etc/modules.conf can get corrupted (containing twice the same aliases). isn't that a bug ? and a little suggestion : why not using this vimrc as a default ? it's in my opinion a better choice than the default one (syntax highlighting, automatic backup...)