Changeset e7484af


Ignore:
Timestamp:
01/30/14 07:37:39 (6 months ago)
Author:
Kris Moore <kris@…>
Branches:
releng/10.0
Children:
021fffe1
Parents:
0e1a7ee
Message:

Backport pbi fixes to pc-updatemanager

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-sh/pc-updatemanager/pc-updatemanager

    r074bcb6 re7484af  
    445445  do 
    446446    pbi=`echo $line | cut -d ' ' -f 1` 
     447    user=`echo $line | cut -d ' ' -f 2` 
     448 
    447449    echo "Removing: ${pbi}" 
    448     pbi_delete $pbi >/dev/null 2>/dev/null 
    449     if [ $? -ne 0 ] ; then 
     450    if [ "$user" != "root" ] ; then 
     451      su $user -c "pbi_icon del-desktop $pbi" 
     452      su $user -c "pbi_icon del-menu $pbi" 
     453      su $user -c "pbi_icon del-mime $pbi" 
     454      su $user -c "pbi_icon del-pathlnk $pbi" 
     455      su $user -c "pbi_delete $pbi" 
     456      result=$? 
     457    else 
     458      pbi_icon del-desktop $pbi 
     459      pbi_icon del-menu $pbi 
     460      pbi_icon del-mime $pbi 
     461      pbi_icon del-pathlnk $pbi 
     462      pbi_delete $pbi >/dev/null 2>/dev/null 
     463      result=$? 
     464    fi 
     465    if [ $result -ne 0 ] ; then 
    450466       echo "Warning: Failed to remove: $pbi" 
    451467       sleep 5 
     
    598614       echo "Press ENTER to continue" 
    599615       read tmp 
     616    else 
     617       # Re-add menu / desktop stuff 
     618       if [ "$user" != "root" ] ; then 
     619         su $user -c "pbi_icon add-pathlnk $shortpbi" 
     620         su $user -c "pbi_icon add-desktop $shortpbi" 
     621         su $user -c "pbi_icon add-menu $shortpbi" 
     622         su $user -c "pbi_icon add-mime $shortpbi" 
     623       else 
     624         pbi_icon add-pathlnk $shortpbi 
     625         pbi_icon add-desktop $shortpbi 
     626         pbi_icon add-menu $shortpbi 
     627         pbi_icon add-mime $shortpbi 
     628       fi 
    600629    fi 
    601630  done < /root/pcbsd-pbi-before-update 
Note: See TracChangeset for help on using the changeset viewer.