[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#298120: allow per-version scripts



That seems mighty fine to me. Does anyone object?
Also, is there somewhere this new feature should be documented?

On Fri, Mar 04, 2005 at 10:11:54PM +0100, martin f krafft wrote:
> Package: initrd-tools
> Version: 0.1.77
> Severity: wishlist
> Tags: patch
> 
> I just packaged kernel-patch-suspend2, which uses
> /etc/mkinitrd/scripts. The problem is that any script in that
> directory are run for all kernel versions, even if not applicable.
> 
> My suggestion is to use the same approach as kernel-package and to
> allow scripts to be installed into /etc/mkinitrd/scripts/$VERSION,
> which is processed after /etc/mkinitrd/scripts. The following patch
> enables this:
> 
> Thanks,
> 
> --- /usr/sbin/mkinitrd.orig 2005-03-04 22:08:34.481568162 +0100
> +++ /usr/sbin/mkinitrd  2005-03-04 22:10:35.417079261 +0100
> @@ -1244,8 +1244,15 @@
>     INITRDDIR=$dir/initrd MODULEDIR=$MODULEDIR VERSION=$VERSION \
>       run-parts $SHARE/scripts
>   fi
> +
>   INITRDDIR=$dir/initrd MODULEDIR=$MODULEDIR VERSION=$VERSION \
>     run-parts "$CONFDIR"/scripts
> +
> + if [ -d $CONFDIR/scripts/$VERSION ]; then
> +   INITRDDIR=$dir/initrd MODULEDIR=$MODULEDIR VERSION=$VERSION \
> +     run-parts "$CONFDIR"/scripts/$VERSION
> + fi
> +
>  }
>  
>  ORIGDIR=`pwd`



-- 
Horms



Reply to: