TIPS: Make your Debia boot screen different each time

Source: Internet
Author: User
Article Title: Tips: Make your Debia boot screen different each time. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
The following code allows you to use the debian machine on which lilo is started to have different boot screens. The system automatically switches one screen at a time.
  
#! /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
#/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
#/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. file
Sed '/debian1.bmp/D'/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. ls
If [! -S/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. 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 ""
  

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.