On Sunday 17 June 2007 20:49, Robert Millan wrote: > if [ -s $tmpfile ] ; then > case $grub_version in > - grub) grub_write_divider ;; > - grub2) : ;; > + grub) > + grub_write_divider > + cat $tmpfile >> $ROOT/boot/grub/$menu_file > + ;; > + grub2) > + grub_write_divider > + cat > $ROOT/etc/grub.d/30_otheros << EOF > +#!/bin/sh > +exec tail -n +3 \$0 > +EOF > + cat $tmpfile >> $ROOT/etc/grub.d/30_otheros > + chmod +x $ROOT/etc/grub.d/30_otheros > + update-grub # propagate 30_otheros to grub.cfg > + ;; > esac > - cat $tmpfile >> $ROOT/boot/grub/$menu_file > rm -f $tmpfile > fi Doesn't it make sense to move 'grub_write_divider' to before the case statement as it is identical for both?
Attachment:
pgpiNe7YLNPsl.pgp
Description: PGP signature