网管联盟 | 网管论坛 | 网管u家 | 网管博客 | 网管软件 | 网管求职 | 小游戏 | 网管搜索 | 网管原创 | 网管聚合 | 网管读摘 | 网管焦点 | 世界素材 | 会员投稿 | 会员中心 
中国网管联盟
Windows Linux Cisco 网络技术 数据库 黑客攻防 DotNet Java PHP 认证 新闻资讯 服务器 存储资讯 网络设备 网管学堂 技术专题 焦点 网吧频道
 当前位置: > bitsCN.com > linux > 系统管理 > 系统管理 > 小技巧:让你的Debia每次开机画面都不一样  

小技巧:让你的Debia每次开机画面都不一样

2004-11-05  作者:BitsCN整理  来源:中国网管联盟  点评 投稿 收藏


  下面的代码可以让你使用lilo开机的debian机器每次的开机画面都不一样,系统每次开机自动切换一个画面。
  
  #!/bin/bash
  #
  # bs_switch This script can collect all the bmp files in the directory
  # /usr/share/lilo/contrib and switch the bs_wwitch in sequence
  # automatically under Debian Linux(Sarge version).
  # It's written by Simon Zhan from Minqing County, China.
  #
  # Version @(#)bs_switch 0.8 11-May-2004 simonzhan@21cn.com
  #
  # notes: bs.lst contain all the files name in the
  # /usr/share/lilo/contrib, and will delete one entry every
  # rebooting the system.
  # FILENAME is the file name which will replace the previous bmp.
  #
  # Usage: Copy this script into /etc/init.d, and make a symbolic link into
  # /etc/rcS.d such as follow(notice the file's permission):
  # ln -s /etc/init.d/bs_switch /etc/rcS.d/S55bs_switch
  # and Enjoy!
  
  cd /usr/share/lilo/contrib
  while true
  do

中国网管联盟bitsCN.com


  if [ ! -f /usr/share/lilo/contrib/bs.lst ];then
  echo ""
  echo "**************************************"
  echo "* bs.lst not exist!, now creating... *"
  echo "**************************************"
  echo ""
  sleep 3
  ls /usr/share/lilo/contrib/*.bmp > /tmp/tmp.file
  sed '/debian1.bmp/d' /tmp/tmp.file > /usr/share/lilo/contrib/bs.lst
  fi
  FILENAME=`sed -n '1p' /usr/share/lilo/contrib/bs.lst`
  sed 1d /usr/share/lilo/contrib/bs.lst > /tmp/tmp.ls
  if [ ! -s /tmp/tmp.ls ];then
  echo ""
  echo "**********************************************"
  echo "* size of the bs.lst is zero, now delete it. *"
  echo "**********************************************"
  echo ""
  sleep 3
  rm /usr/share/lilo/contrib/bs.lst
  else
  mv /tmp/tmp.ls /usr/share/lilo/contrib/bs.lst
  fi
  if [ -f $FILENAME ];then
  echo ""
  echo "*******************"
  echo "* Ok, I found it! *"
  echo "*******************"

网管bitscn_com


  echo ""
  sleep 3
  break
  fi
  echo ""
  echo "*****************************************************************"
  echo "* OOPS!, I can't find the bmp file, I have to go to the next... *"
  echo "*****************************************************************"
  echo ""
  sleep 3
  done
  cp $FILENAME debian1.bmp
  lilo > /dev/null 2>&1
  echo ""
  echo "*********************************"
  echo "* Bootscreen has been switched! *"
  echo "*********************************"
  echo ""
  
 上一篇:配置OracleDesigner的Repository   下一篇:Linux知识宝库:Kylix经典十大难题解决方法
小技巧:让你的Debia每次开机画面都不一样 评论:
loading.. 评论加载中…
评论:请自觉遵守互联网相关政策法规,评论不得超过250字。

验证码: 注册用户
本类热门排行:
最新推荐文章:
网管论坛交流: