Magellan Linux

Diff of /mage/branches/alx-0_6_0/include/alx.minc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2516 by niro, Wed Jun 8 09:13:05 2011 UTC revision 2517 by niro, Thu Jun 30 15:22:45 2011 UTC
# Line 42  alx_grub_update() Line 42  alx_grub_update()
42   local grubopts   local grubopts
43   local OLD_IFS   local OLD_IFS
44   local grubconf="/boot/grub/grub.conf"   local grubconf="/boot/grub/grub.conf"
45     local pass
46    
47   KERNEL_IMAGE="$1"   KERNEL_IMAGE="$1"
48   KERNEL_DESCRIPTION="$2"   KERNEL_DESCRIPTION="$2"
# Line 93  alx_grub_update() Line 94  alx_grub_update()
94   : > ${grubconf}   : > ${grubconf}
95   echo "default 0" >> ${grubconf}   echo "default 0" >> ${grubconf}
96   echo "timeout 3" >> ${grubconf}   echo "timeout 3" >> ${grubconf}
97   # using roots current password   # using roots current password if one was set
98   echo "password --md5 $(cat /etc/shadow | grep root | cut -d: -f2)"  >> ${grubconf}   pass="$(grep '^root:' /etc/shadow | cut -d: -f2)"
99     if [[ -n ${pass} ]]
100     then
101     echo "password --md5 $(cat /etc/shadow | grep root | cut -d: -f2)"  >> ${grubconf}
102     fi
103   echo  >> ${grubconf}   echo  >> ${grubconf}
104   echo "# normal boot" >> ${grubconf}   echo "# normal boot" >> ${grubconf}
105   echo "title ${KERNEL_DESCRIPTION}" >> ${grubconf}   echo "title ${KERNEL_DESCRIPTION}" >> ${grubconf}

Legend:
Removed from v.2516  
changed lines
  Added in v.2517