`

Adding a startup script to be run at bootup

阅读更多

Ubuntu

 

1. sudo vi /etc/init.d/workDriveMap

 

2. chmod 755 /etc/init.d/workDriveMap

 

3. update-rc.d workDriveMap defaults(update-rc.d workDriveMap remove)

 

(So you have a script of your own that you want to run at bootup, each time you boot up. This will tell you how to do that.

Write a script. put it in the /etc/init.d/ directory.
Lets say you called it FOO. You then run

% update-rc.d FOO defaults

You also have to make the file you created, FOO, executable, using
$chmod +x FOO

You can check out
% man update-rc.d for more information. It is a Debian utility to install scripts. The option “defaults” puts a link to start FOO in run levels 2, 3, 4 and 5. (and puts a link to stop FOO into 0, 1 and 6.)

Also, to know which runlevel you are in, use the runlevel command.)

 

Solaris

 

1. Create a script in /etc/init.d, for example, workDriveMap

 

    su root

    vi /etc/init.d/workDriveMap

 

2.  chmod 755 /etc/init.d/workDriveMap

 

3.  Link them.

    

     ln -s /etc/init.d/workDriveMap /etc/rc0.d/SworkDriveMap
     ln -s /etc/init.d/workDriveMap /etc/rc1.d/SworkDriveMap

     ln -s /etc/init.d/workDriveMap /etc/rc2.d/SworkDriveMap
     ln -s /etc/init.d/workDriveMap /etc/rcS.d/SworkDriveMap

 

 

 

分享到:
评论
1 楼 RobertLeeJesus 2008-10-31  
如何移除脚本

update-rc -f FOO remove

相关推荐

    Taking the pain out of adding a horizontal scrollbar to a li

    标题“Taking the pain out of adding a horizontal scrollbar to a listbox”指向的就是这样一个问题:如何优雅地为列表框添加水平滚动条,以提升用户体验。这里我们将详细探讨这个主题,并提供一些实践技巧。 ...

    BURNINTEST--硬件检测工具

    - A printer to run the printer test, set-up as the default printer in Windows. - A CD ROM + 1 Music CD or Data CD to run the CD test. - A CD-RW to run the CD burn test. - A network connection and the ...

    Adding a search facility to your website

    在构建一个功能完善的网站时,添加搜索功能是至关重要的一步,它能让用户更方便地找到他们需要的信息。本文将深入探讨如何为您的网站添加搜索设施,以提高用户体验和网站的实用性。 首先,我们要理解搜索功能的基本...

    A tutorial on adding columns to Explorer’s details view via

    标题 "A tutorial on adding columns to Explorer’s details view via" 是一篇关于如何通过列处理程序外壳扩展在Windows资源管理器(Explorer)的详细视图中添加自定义列的教程。这通常涉及到增强Windows操作系统中...

    Adding a Node to a 10g RAC Cluster

    ### 添加节点到10g RAC 集群 #### 概述 本文档旨在为用户提供一份详尽的指南,帮助其将新节点添加至Oracle 10g Real Applications Clusters (RAC)环境中。该文档适用于数据库管理员(DBAs)和支持分析师等技术人员,...

    Adding a Build Banner to ASP.NET Pages

    在ASP.NET开发中,添加构建横幅是一种常见做法,它有助于开发者在页面顶部或底部显示当前应用程序的版本信息、构建日期等,以便于追踪和管理不同的应用版本。...下面将详细介绍如何在ASP.NET页面中添加构建横幅。...

    Give your apps a unique look by adding a logo to your menu(4

    标题"Give your apps a unique look by adding a logo to your menu"强调了这一点,它指出通过在菜单中加入logo,可以使得你的应用在众多软件中脱颖而出,营造出个性化且专业的形象。 描述中的"(48KB)"可能是指该...

    Foundations for Analytics with Python O-Reilly-2016-Clinton W. Brownley

    However, it can be a nuisance if your script needs to run on a routine basis (e.g., daily, weekly, monthly, or quarterly), or if you need to run lots of scripts on a routine basis. On Windows, you ...

    UE(官方下载)

    We are often asked if it is possible to run an UltraEdit macro or script on a file from the command line. The answer is yes - and it's not only possible, it's extremely simple! Using find/replace ...

    C# Game Programming Cookbook for Unity 3D - 2014

    8.3 Adding Sound to the Weapons.......................................167 9. AI Manager 169 9.1 The AI State Control Script..........................................171 9.2 The Base AI Control Script....

    a project model for the FreeBSD Project.7z

    This project model is not meant to be a tool to justify creating impositions for developers, but as a tool to facilitate coordination. It is meant as a description of the project, with an overview of...

    Learning Web Design: A Beginner’s Guide to HTML... ..., 5th Edition

    It is simple and clear enough for beginners, yet thorough enough to be a useful reference for experienced developers keeping their skills up to date. Build HTML pages with text, links, images, tables...

    VclZip pro v3.10.1

    This will cause files to not be decryptable by normal zip utilities thereby adding a bit of extra security. Bugs Fixed: IMPORTANT!!! Behavior of freeing the ArchiveStream (compressed stream) has ...

    spring-boot-reference.pdf

    Using Spock to Test Spring Boot Applications 43.4. Test Utilities 43.4.1. ConfigFileApplicationContextInitializer 43.4.2. TestPropertyValues 43.4.3. OutputCapture 43.4.4. TestRestTemplate 44. ...

    CE中文版-启点CE过NP中文.exe

    Compare memory: Added a limit to the number of address values shown per row (can be changed) Address List: When the option to deactivate children is set, the children will get deactivated first Memory...

    ASP.NET Core 1.1 For Beginners: How to Build a MVC Website

    The goal is to get you familiar with ASP.NET Core 1.1 by adding middleware and services one piece at a time, building a basic application. Then you will build a second MVC application using a ...

    A pure Python library for adding tables to a Tkinter application

    "A pure Python library for adding tables to a Tkinter application" 指的是一款专门用于在 Tkinter 应用程序中添加表格功能的库。这个库为 Tkinter 提供了强大的数据展示和交互能力,使得开发者可以方便地构建...

Global site tag (gtag.js) - Google Analytics