Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2506183
  • 博文数量: 308
  • 博客积分: 5547
  • 博客等级: 大校
  • 技术积分: 3782
  • 用 户 组: 普通用户
  • 注册时间: 2009-11-24 09:47
个人简介

hello world.

文章分类

全部博文(308)

分类: LINUX

2011-06-21 15:10:23

  1. #! /bin/bash
  2. SUCCESS=0
  3. E_NOARGS=65
  4. if [ -z "$1" ]
  5. then
  6. echo "Usage: `basename $0` rpm-file"
  7. exit $E_NOARGS
  8. fi
  9. {
  10. echo
  11. echo "Archive Description:"
  12. rpm -qpi $1
  13. echo
  14. echo "Archive Listing:"
  15. rpm -qpl $1
  16. echo
  17. rpm -i --test $1
  18. if [ "$?" -eq $SUCCESS ]
  19. then
  20. echo "$1 can be installed."
  21. else
  22. echo "$1 cannot be installed."
  23. fi
  24. echo
  25. } > "$1.test"
  26. echo "Results of rpm test in file $1.test"
  27. exit 0
阅读(3199) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~