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

Bug#363437: initramfs-tools: [S/390] dasd hook script being run twice causes error



Package: initramfs-tools
Version: 0.59b

I've reported this before, but now I've traced it...

During kernel upgrade on S/390 I see this error:
 ln: creating symbolic link `/tmp/mkinitramfs_laxXYw//etc/modprobe.d/dasd'
 to `/tmp/initramfs_dasd': File exists

The attached trace (which cost me quite a lot of pain to obtain because it 
looks like 'set -x' gets unset in the cause of running mkinitramfs...) 
shows that this is because the script /etc/mkinitramfs/hooks/dasd gets 
executed twice.

Could it be that that script should just 'exit 0' if it's called the first 
time with the "prereqs" parameter (or, alternatively, the second time 
when it's called without parameter)?
+ echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+ echo 'Running /etc/mkinitramfs/hooks....'
Running /etc/mkinitramfs/hooks....
+ echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+ run_scripts /etc/mkinitramfs/hooks
+ initdir=/etc/mkinitramfs/hooks
+ get_prereqs
+ set_initlist
+ unset initlist
+ for si_x in '${initdir}/*'
+ '[' '!' -x /etc/mkinitramfs/hooks/dasd ']'
++ basename /etc/mkinitramfs/hooks/dasd
+ initlist=' dasd'
+ for gp_x in '${initlist}'
++ /etc/mkinitramfs/hooks/dasd prereqs

+ . /usr/share/initramfs-tools/hook-functions
+ '[' -r /proc/dasd/devices ']'
++ cut '-d(' -f1 /proc/dasd/devices
+ dasd_dev='0.0.0120
0.0.0121'
+ for dev in '$dasd_dev'
+ '[' -n '' ']'
+ dasd_devs=0.0.0120
+ for dev in '$dasd_dev'
+ '[' -n 0.0.0120 ']'
+ dasd_devs=0.0.0120,
+ dasd_devs=0.0.0120,0.0.0121
+ '[' -n 0.0.0120,0.0.0121 ']'
+ echo 'options dasd_mod dasd=0.0.0120,0.0.0121'
+ copy_exec /tmp/initramfs_dasd /etc/modprobe.d/dasd
++ basename /tmp/initramfs_dasd
+ final_destination=/tmp/mkinitramfs_laxXYw//etc/modprobe.d/dasd/initramfs_dasd
+ '[' -L /tmp/mkinitramfs_laxXYw//etc/modprobe.d/dasd/initramfs_dasd ']'
+ ln -s /tmp/initramfs_dasd /tmp/mkinitramfs_laxXYw//etc/modprobe.d/dasd
++ sed -e '
            /\//!d;
            /linux-gate/d;
            /=>/ {s/.*=>[[:blank:]]*\([^[:blank:]]*\).*/\1/};
            s/[[:blank:]]*\([^[:blank:]]*\) (.*)/\1/'
++ ldd /tmp/initramfs_dasd

+ tmp=
+ eval 'array_dasd=""'
++ array_dasd=
+ reduce_prereqs
+ unset runlist
+ set_initlist
+ unset initlist
+ for si_x in '${initdir}/*'
+ '[' '!' -x /etc/mkinitramfs/hooks/dasd ']'
++ basename /etc/mkinitramfs/hooks/dasd
+ initlist=' dasd'
+ set - dasd

+ . /usr/share/initramfs-tools/hook-functions
+ '[' -r /proc/dasd/devices ']'
++ cut '-d(' -f1 /proc/dasd/devices
+ dasd_dev='0.0.0120
0.0.0121'
+ for dev in '$dasd_dev'
+ '[' -n '' ']'
+ dasd_devs=0.0.0120
+ for dev in '$dasd_dev'
+ '[' -n 0.0.0120 ']'
+ dasd_devs=0.0.0120,
+ dasd_devs=0.0.0120,0.0.0121
+ '[' -n 0.0.0120,0.0.0121 ']'
+ echo 'options dasd_mod dasd=0.0.0120,0.0.0121'
+ copy_exec /tmp/initramfs_dasd /etc/modprobe.d/dasd
++ basename /tmp/initramfs_dasd
+ final_destination=/tmp/mkinitramfs_laxXYw//etc/modprobe.d/dasd/initramfs_dasd
+ '[' -L /tmp/mkinitramfs_laxXYw//etc/modprobe.d/dasd/initramfs_dasd ']'
+ ln -s /tmp/initramfs_dasd /tmp/mkinitramfs_laxXYw//etc/modprobe.d/dasd
ln: creating symbolic link `/tmp/mkinitramfs_laxXYw//etc/modprobe.d/dasd' to `/tmp/initramfs_dasd': File exists
++ ldd /tmp/initramfs_dasd
++ sed -e '
            /\//!d;
            /linux-gate/d;
            /=>/ {s/.*=>[[:blank:]]*\([^[:blank:]]*\).*/\1/};
            s/[[:blank:]]*\([^[:blank:]]*\) (.*)/\1/'

Attachment: pgpVF7mkMSkWj.pgp
Description: PGP signature


Reply to: