PDA

Виж пълна версия : Boot script


the_black_wind
26.02.05 г., 13:22
Здравейте,
някои може ли да ми каже къде трябва да сложа в suse 9.1 един скрипт за да се стартитра със стартирането на линукс-а?
Пробвах в /еtc/rc.d/boot.d /etc/rc.d/init.d и в още някой папки от /etc/etc.d но нищо нестава.

Stash
26.02.05 г., 14:06
има вариант да му опишеш пътя в /etc/rc.d/rc.local примерно най-отдолу
./etc/rc.d/script на файла, като на този фаил script трябва да му дадеш права за изпълнение аз вично така го правя Успех

the_black_wind
26.02.05 г., 18:10
Ми в мойто suse не видях rc.local само rc има,пробвах в него но нищо нестава.Какво имаше предвид под това да му дам права за изпълнение?Ако го стартирам ръчно сичко си е 6 но иначе линукс-а неможе да ми го пусне.

Stash
26.02.05 г., 19:35
за сусе виж кой ти е изпълнява ролята на rc.local и там сложи реда с пътя на фаила с точка "." отпреда се изпълни дай списък с файловете :) в rc.d

xts
26.02.05 г., 23:34
Точката определя текуща директория. Защо я слагаш когато пишеш пълния път.

/etc/rc.d/rc.local - според google и в SuSe e същия път.

Here is a list of some common settings, numerical values and their meanings:

-rw------- (600) Only the owner has read and write permissions.
-rw-r--r-- (644) Only the owner has read and write permissions; the group and others can read only.
-rwx------ (700) Only the owner has read, write and execute permissions.
-rwxr-xr-x (755) The owner has read, write and execute permissions; the group and others can only read and execute.
-rwx--x--x (711) The owner has read, write and execute permissions; the group and others can only execute.
-rw-rw-rw- (666) Everyone can read and write to the file. (Be careful with these permissions.)
-rwxrwxrwx (777) Everyone can read, write and execute. (Again, this permissions setting can be hazardous.)

Stash
27.02.05 г., 01:33
еми де да знам тъпо е ама така съм свикнал :) и така го пиша и затова така съм го написал :) с точка :)
то е все едно :)

dexxa
27.02.05 г., 22:25
СУСЕ-то няма "rc.local". Ролята му, до някъде, е поверена на "/etc/rc.d/boot.local".
Но има един проблем-този скрипт се извиква веднага след бутването преди рън-левъл. Ако скрипта, който искаш да изпълниш засяга някой сървър или примерно конфигуриране на параметър на лан карта, няма да стане.
Аз съм си рашил проблема така:
"Here's what I did.
Create the file. " touch /etc/init.d/rc.local " make it executable " chmod +x /etc/init.d/rc.local ". Next we make the links, " ln -s /etc/init.d/rc.local /etc/rc.local " handy link for editing! Link to run levels, level 2" ln -s /etc/init.d/rc.local /etc/rc2.d/S99local " level 3 " ln -s /etc/init.d/rc.local /etc/rc3.d/S99local " level 5 " ln -s /etc/init.d/rc.local /etc/rc5.d/S99local " to test it insert a command like " touch /home/hello.chinaman " if the file is in /home after reboot it works, remove this command, put some comments in the file just in case some one inherits the system from you ( is a work machine? ). I hope this helps you understand how the scripts are executed at different levels, it may stand by you if you install a custom package and need to write a startup script!"

the_black_wind
01.03.05 г., 21:39
Благодаря ви за информацията :) !!!