我的一亩三分地 我就喜欢!
13fen  设为主页
 收藏本站
 
当前位置: > 一亩三分地:首页 > 操作系统 > Linux > 使用经验 > 小技巧:让你的Debia每次开机画面都不一样
热门文章排行
热门文章排行 一步一步的制作arm-linux交叉编译环(12-05)
深入理解硬盘的Linux分区(12-22)
深入浅出定制Linux系统环境变量(12-05)
Linux常用基本命令(二)(10-13)
红旗Linux5.0桌面正式版光盘安装{图(11-15)
精采文章排行
精采文章排行 vi基本技巧(11-16)
Linux历史篇(11-16)
Linux不是Windows(11-16)
第一次进入红旗后,应该做的几件事(11-15)
详解linux与win分区格式(11-15)
技术专题推荐
网管论坛交流
 

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

作者:佚名   来源:Linux 宝库   点击:   日期:2006-12-05


-->

  下面的代码可以让你使用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
  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 "*******************"
  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 ""
  






文章评论】 【收藏本文】 【推荐好友】 【打印本文】 【论坛讨论

   相关文章:
·轻松安装RedHat9.0 ·怎样安装Oracle9iforHP-UX双机
·安装过windows后如何安装linux ·深入理解硬盘的Linux分区
·在虚拟pc上安装linux操作系统 ·在Linux下安装BT服务器的捷径

   文章评论:(条)
  
 请留名: 匿名评论   点击查看所有评论 网管论坛
 

  责任编辑:一分  声明:刊登此文章是为了传递更多信息,文章内容仅供参考,转载请注明出处。