Opened 23 years ago

Closed 21 years ago

#325 closed defect (fixed)

lfs-bootscripts-1.13

Reported by: gerard@… Owned by: lfs-book@…
Priority: normal Milestone:
Component: Book Version: CVS
Severity: normal Keywords:
Cc: list@…

Description

Use variables in the daemon start scripts, like:

source /etc/sysconfig/rc source $rc_functions

NAME="" #name of the service/application PREFIX="" #path to the application APP="" #the application OPTIONS="" #parameters

case "$1" in

start)

echo "Starting $NAME..." loadproc $PREFIX/$APP $OPTIONS ;;

and so on

Attachments (9)

rc.diff (1.7 KB ) - added by gerard@… 23 years ago.
Fixed the priority digit stripping to obtain $suffix - will work with mixed amount of numbers
LFS-norundel-2002.12.24.12.patch (1.1 KB ) - added by gerard@… 22 years ago.
Don't remove /var/run/* instead clean it out, leaving directories intact
lfs-bootscripts-1.10-syntax.patch (12.2 KB ) - added by gerard@… 22 years ago.
Patch to make the scripts compatible with ash from busybox
lfs-bootscripts-1.11-fixes.diff (15.1 KB ) - added by iwanek@… 22 years ago.
this patch implements all remaining fixes except for comment #4 and comment #5
pre2.diff (38.7 KB ) - added by iwanek@… 22 years ago.
lfs-bootscripts-1.12-pre2
network.tar.bz2 (1.9 KB ) - added by gerard@… 21 years ago.
Fixed version of conathan's updated network scripts.
lfs-bootscripts-1.11.fsck_return_codes.patch (707 bytes ) - added by greg@… 21 years ago.
suggested fix
func.diff (469 bytes ) - added by DJ Lucas 21 years ago.
Simple workaround for press enter at error
README (2.8 KB ) - added by DJ Lucas 21 years ago.
suggested README

Download all attachments as: .zip

Change History (33)

comment:1 by gerard@…, 23 years ago

dependson: 30

comment:2 by gerard@…, 23 years ago

When collecting K* links, there's a bug that causes you not being able to use more than two digits for the links, else you'll get errors that there is not corresponding S* link in the previous level.

See discussion started:

From: ask@… (DaClink) Subject: An Annoying message when switching runlevels Date: Thu, 11 Apr 2002 10:57:12 +0000 (UTC) To: blfs-support@…

by gerard@…, 23 years ago

Attachment: rc.diff added

Fixed the priority digit stripping to obtain $suffix - will work with mixed amount of numbers

comment:3 by gerard@…, 23 years ago

add the -d option to mountfs's umount command to free up loop devices.

comment:4 by gerard@…, 23 years ago

Write more docs regarding usage of the scripts, especially the network script's ability to use /etc/sysconfig/network-devicese/ifup-devicename script to do the work rather than the default ifconfig command run by the ifup script (same for ifdown-devicename)

comment:5 by gerard@…, 23 years ago

Instead of just shutting down on error, see what can be done to ask the user what to do when an error has been encountered.

comment:6 by gerard@…, 23 years ago

update for cleanfs:

find /var/run -not -type d -exec rm {} \;

comment:7 by markh@…, 23 years ago

On lfs-dev, Erika Pacholleck pointed out that the above change to use find:

Needs (at least here, dunno about standard lfs) mv /usr/bin/find /bin

so if it's decided to do this, we'll need to add the relevant mv to chapter6 findutils.

comment:8 by gerard@…, 22 years ago

From: list@…

I found following bug in /etc/rc.d/init.d/functions. If you use a serial console "stty size" (line 16) always reports "0 0". When you start something like "/etc/rc.d/init.d/sysklogd start" the "[ OK ]" message beginns at column 0 and overwrites the "starting ..." text. Following patch resolves this problem. ============== snip ==================== --- functions.orig 2002-05-29 17:07:31.000000000 +0200 +++ functions 2002-05-29 17:09:10.000000000 +0200 @@ -15,6 +15,10 @@

COLUMNS=$(stty size) COLUMNS=${COLUMNS##* }

+ +# on serial console stty reports 0 +# change this to 80 here +if [ "$COLUMNS" == "0" ] +then + COLUMNS=80 +fi

COL=$[ $COLUMNS - 10 ] WCOL=$[ $COLUMNS - 30 ] SET_COL="echo -en
033[${COL}G"

============== /snip ====================

comment:9 by gerard@…, 22 years ago

Cc: list@… added

* Bug 367 has been marked as a duplicate of this bug. *

comment:10 by gerard@…, 22 years ago

Priority: normalhighest

comment:11 by gerard@…, 22 years ago

Addition to comment #7 - don't just run 'find' (if we are going to do it, not sure yet) on /var/run also run it on /var/lock

comment:12 by gerard@…, 22 years ago

Priority: highestlowest
Summary: lfs-bootscripts-1.10lfs-bootscripts-1.11

I am releasing 1.10 now but nothing much has changed other than a small change so checkfs can work with non-ext2 file systems better. All the changes here will go into 1.11 in the future (too much work to test all the new code).

comment:13 by markh@…, 22 years ago

Another thing you might want to consider adding would be to set the domainname correctly:

Maybe add a line to /etc/sysconfig/network DOMAINNAME=linuxfromscratch.org

And then apply this patch to localnet

--- /home/mark/LFS/LFS/bootscripts/rc.d/init.d/localnet 2002-03-16 18:26:44.000000000 +0000 +++ /etc/rc.d/init.d/localnet 2002-09-17 20:12:19.000000000 +0100 @@ -15,6 +15,9 @@

echo "Setting hostname to $HOSTNAME..." loadproc hostname $HOSTNAME

+ + echo "Setting domainname to $DOMAINNAME..." + loadproc domainname $DOMAINNAME

;;

stop)

I don't know why, it just feels cleaner that when I run domainname, it gives me the proper answer ;-) (Oh, and I think it should go in the base bootscripts because I consider it part of a basic network initialisation procedure).

by gerard@…, 22 years ago

Don't remove /var/run/* instead clean it out, leaving directories intact

by gerard@…, 22 years ago

Patch to make the scripts compatible with ash from busybox

comment:14 by gerard@…, 22 years ago

Priority: lowesthighest

by iwanek@…, 22 years ago

this patch implements all remaining fixes except for comment #4 and comment #5

comment:15 by gerard@…, 22 years ago

Summary: lfs-bootscripts-1.11lfs-bootscripts-1.12

comment:16 by gerard@…, 22 years ago

See http://archive.linuxfromscratch.org/mail-archives/lfs-dev/2003/05/0980.html

The idea is to make the network scripts more generic as to allow different services (ie: DHCP instead of static IP only as assumed now) to be plugged in without the need to rewrite a bunch of files.

This should be tested before implementing.

by iwanek@…, 22 years ago

Attachment: pre2.diff added

lfs-bootscripts-1.12-pre2

comment:17 by iwanek@…, 22 years ago

attachments.isobsolete: 01

by gerard@…, 21 years ago

Attachment: network.tar.bz2 added

Fixed version of conathan's updated network scripts.

comment:18 by greg@…, 21 years ago

There is a problem with fsck return codes that needs fixing. See the thread here for details:-

http://linuxfromscratch.org/pipermail/lfs-dev/2003-August/036184.html

I'll attach a suggested patch.

by greg@…, 21 years ago

suggested fix

comment:19 by gerard@…, 21 years ago

Priority: highesthigh

comment:20 by gerard@…, 21 years ago

Summary: lfs-bootscripts-1.12lfs-bootscripts-1.13

Next will be 1.13

comment:21 by gerard@…, 21 years ago

dependson: 30

comment:22 by greg@…, 21 years ago

Bootscripts currently use "touch" unnecessarily.

It can be replaced by "> /var/run/utmp" like is currently done in the mountfs script for /etc/mtab.

See Bug 679 for some background.

(we can stop moving "touch" into /bin once the bootscripts are modified).

by DJ Lucas, 21 years ago

Attachment: func.diff added

Simple workaround for press enter at error

by DJ Lucas, 21 years ago

Attachment: README added

suggested README

comment:23 by gerard@…, 21 years ago

Priority: highnormal

comment:24 by jeremy@…, 21 years ago

Resolution: fixed
Status: newclosed

Closing this bug for LFS-bootscripts for now - bootscript problems are now tracked as part of the LFS-bootscripts bugzilla project.

Note: See TracTickets for help on using tickets.