[arch-general] mkinitcpio: WARNING: deprecated 'install' function. This should be renamed 'build' for custom hook
Hi, I have a custom hook [1] (opencrypt to setup encrypted partitions for me) and last days (well, a couple of months maybe:P) I'm getting this on every mkinitcpio generation: -> Parsing hook: [opencrypt] ==> WARNING: Hook 'opencrypt' uses a deprecated 'install' function. This should be renamed 'build' -> Parsing hook: [resume] Fortunately, the system still works ok, I am just curious what's the complaint about? I checked the official hooks in /lib/initcpio/hooks and none uses build(), they do all run_hook(). Thanks, Mark =================== [1] custom hook opencrypt # vim: set ft=sh: # marek for encryption run_hook () { echo "opencrypt hook" # cryptsetup luksOpen /dev/sda6 preDevice ## handled by cryptdevice=/dev/sda6:preDevice boot cmd line # sda7 now, +1 shift mkdir -p /mnt/pre mount -n -t ext4 /dev/mapper/preDevice /mnt/pre echo "swapDevice: " cryptsetup -d /mnt/pre/swap.key luksOpen /dev/sda8 swapDevice echo "homeDevice: " cryptsetup -d /mnt/pre/home.key luksOpen /dev/sda10 homeDevice echo "storeDevice: " cryptsetup -d /mnt/pre/store.key luksOpen /dev/sda6 storeDevice umount /mnt/pre cryptsetup luksClose preDevice echo "[ok]" } -- Marek Otahal :o)
On Sun, Aug 21, 2011 at 1:42 PM, Marek Otahal <markotahal@gmail.com> wrote:
Hi,
I have a custom hook [1] (opencrypt to setup encrypted partitions for me) and last days (well, a couple of months maybe:P) I'm getting this on every mkinitcpio generation:
-> Parsing hook: [opencrypt] ==> WARNING: Hook 'opencrypt' uses a deprecated 'install' function. This should be renamed 'build' -> Parsing hook: [resume]
Fortunately, the system still works ok, I am just curious what's the complaint about? I checked the official hooks in /lib/initcpio/hooks and none uses build(), they do all run_hook().
Have a look in /lib/initcpio/install/ instead. The complaint is that your custom file has an install() function. Just rename it to build() and everything should be fine. HTH, Tom
On Sunday 21 of August 2011 15:06:25 Tom Gundersen wrote:
On Sun, Aug 21, 2011 at 1:42 PM, Marek Otahal <markotahal@gmail.com> wrote:
Hi,
I have a custom hook [1] (opencrypt to setup encrypted partitions for me) and last days (well, a couple of months maybe:P) I'm getting this on every mkinitcpio generation:
-> Parsing hook: [opencrypt] ==> WARNING: Hook 'opencrypt' uses a deprecated 'install' function. This should be renamed 'build' -> Parsing hook: [resume]
Fortunately, the system still works ok, I am just curious what's the complaint about? I checked the official hooks in /lib/initcpio/hooks and none uses build(), they do all run_hook().
Have a look in /lib/initcpio/install/ instead. The complaint is that your custom file has an install() function. Just rename it to build() and everything should be fine.
HTH,
Tom Oh, so that was it! Many thanks Tom :) --
Marek Otahal :o)
participants (2)
-
Marek Otahal
-
Tom Gundersen