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 -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Bug#298120: allow per-version scripts
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: Sounds reasonable to me. I have one questions about the resulting initrd. How does mkinitrd make sure (or not) that the programs called in the scripts are (or not) included in the initrd, and what about the libraries used ? Friendly, Sven Luther -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Bug#298120: allow per-version scripts
also sprach Sven Luther <[EMAIL PROTECTED]> [2005.03.05.1239 +0100]: > Sounds reasonable to me. I have one questions about the resulting > initrd. How does mkinitrd make sure (or not) that the programs > called in the scripts are (or not) included in the initrd, and > what about the libraries used ? I just use scripts, but I started to implement a means in which multiple packages can modify the initrd. It's very rudimentary though. Check out http://madduck.net/~madduck/scratch/mkinitrd-script Cheers, -- .''`. martin f. krafft <[EMAIL PROTECTED]> : :' :proud Debian developer, admin, user, and author `. `'` `- Debian - when you have better things to do than fixing a system Invalid/expired PGP subkeys? Use subkeys.pgp.net as keyserver! signature.asc Description: Digital signature
Bug#298120: allow per-version scripts
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` -- System Information: Debian Release: 3.1 Architecture: amd64 (x86_64) Kernel: Linux 2.6.10-9-amd64-k8 Locale: LANG=en_GB, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Versions of packages initrd-tools depends on: ii coreutils [fileutils] 5.2.1-2The GNU core utilities ii cpio 2.5-1.2GNU cpio -- a program to manage ar ii cramfsprogs 1.1-6 Tools for CramFs (Compressed ROM F ii dash 0.5.2-2The Debian Almquist Shell ii util-linux2.12p-3Miscellaneous system utilities -- no debconf information -- .''`. martin f. krafft <[EMAIL PROTECTED]> : :' :proud Debian developer, admin, user, and author `. `'` `- Debian - when you have better things to do than fixing a system Invalid/expired PGP subkeys? Use subkeys.pgp.net as keyserver! signature.asc Description: Digital signature