LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 06-14-2014, 12:20 PM   #31
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856

Uploaded atd script here:
https://dl.dropboxusercontent.com/s/...gv/install-atd
Tested and working.

Last edited by Keith Hedger; 06-14-2014 at 03:45 PM.
 
Old 06-14-2014, 02:04 PM   #32
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558

Original Poster
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Quote:
Originally Posted by Keith Hedger View Post
Uploaded atd script here:
https://dl.dropboxusercontent.com/s/...gv/install-atd
Tested and working.
Thanks Keith. BTW... had to make a small URL correction for you.
 
Old 06-14-2014, 03:41 PM   #33
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
What correction?

Never mind I see it.

Last edited by Keith Hedger; 06-14-2014 at 03:44 PM.
 
Old 06-15-2014, 03:55 PM   #34
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558

Original Poster
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
No prob man. :-)
 
Old 06-16-2014, 12:24 PM   #35
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
Uploaded bluetooth service here:
https://dl.dropboxusercontent.com/s/...tall-bluetooth

Tested and working.
 
Old 06-16-2014, 04:16 PM   #36
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558

Original Poster
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Okay a slight update:

1. Still debugging dbus issues a bit so not sure how much longer that will take. Have a feeling we can leave it in stage 2 for now, but I'm still debating this one heavily. DBus is VERY finicky. As stated, if anything attempts to use or launch a session in dbus, dbus won't register. It works still, but Runit can't find it., if Runit can't find it, Runit can not shut it down. This could be a cause of issues in stage 3 with shutdowns. if it is a cause of issues, the only remedy will be to move DBus back to Stage 1 and keep it there.

2. Runlevels are being restored.

The current schema will be a bit different than that of the original, but until further notice, and I can research all the proper protocols for it... All services in stage 2 will have a symlink between the /etc/sv directory and the /etc/runit/runsvdir corresponding single, multi, or desktop directories. Using the /etc/runit/runsvdir/current just didn't sit well with me. It's a symlinked directory that only exists during system execution rather than chroot, so there's no telling how well it would have worked. All services will have a direct symlink between /etc/sv and the corresponding directory now for desktop and mutli-user modes. The only difference is desktop will contain the kdm startup. Single user has only a single getty and openssh for maintenance/administrative purposes. Saying default instead of multi didn't fit well. Sysvinit runlevel 3 is multi-user mode, so it only seemed fitting to name it aptly.

3. The current directory in /etc/runit/runsvdir is now symlinked directly to /var/service. This should cut down on any issues with service reporting.

Last edited by ReaperX7; 06-16-2014 at 04:36 PM.
 
Old 06-17-2014, 10:18 AM   #37
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
Updated install-atd and install-ntpd, fouind a couple of minor typos.
 
Old 06-17-2014, 02:18 PM   #38
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558

Original Poster
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
New installer release:

Version 1.1 - 2014-06-18

- Runlevels are restored. All services must now install by default to all service directories rather than just one. This will allow for better control across all runlevels of services (multi and desktop) and avoid deployment of service scripts in /etc/runit/runsvdir/current which is a dynamic directory, rather than a static directory.

- Runlevel Single must be by default assigned OpenSSH and Getty-1 ONLY for administrative purposes.

- Directory /var/service is now a symlink to temporary directory /etc/runit/runsvdir/current. If this directory is not created during the install script phase, it may be created by the user using this command:

Code:
ln -sv /etc/runit/runsvdir/current/ /var/service
Note: Do note that this command must have /../../../current/ listed as a directory and not a file, or the symlink will not properly link the directory as such.

- Stage 1 has been assigned flags to auto-detect alsactl and sysstat utilities and load them if found. If services are not installed, the script will bypass them.

- Install script for base services of Runit is now streamlined a bit to work faster.

- Rather than symlinks, all init files used by stage 1 are now copied to the /etc/runit/init.d directory.

Notice!!

This installer will work best AFTER completing Beyond Linux From Scratch Chapter 3 in which the Random Number Generator script is installed. The Random script is not required, but does serve as a level of completeness. Future revisions, may assign the startup script into Stage 1 as an auto-detected feature.

To-Do-List:

I would like to eventually migrate all init script functions into stages 1 and 3 without external scripting. This would be a monumental effort in it's own right, but it would simplify things more. This would have to be carefully done as to not mess with anything important, or implement a bad feature.

I have been thinking about it, but I'd like to look at supporting some legacy daemons for some level of backwards compatibility such as supporting hald. Hal as a projects was deprecated by udev a while back as a device manager and driver loader alongside a co-component hotplug which used scripting to load modules. The project is deprecated and mostly used only now by those interested in it and BSDs, but it's functionality still serves several purposes including login management, Digital Rights Management, and virtual hardware support. As far as other daemons, we can research them on a case by case basis if need be.
Attached Files
File Type: txt runit-alt-hint.txt (10.6 KB, 38 views)
File Type: txt setup-runit.txt (6.9 KB, 35 views)

Last edited by ReaperX7; 06-20-2014 at 04:27 AM.
 
Old 07-10-2014, 07:08 PM   #39
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558

Original Poster
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Release - 1.2 - 7-10-2014

Version 1.2 of the setup-runit installer script is out and contains several fixes to shutdown services properly. Thanks to Stoat for his sample stage-3 to fix this error.

You can still use the 1.1 runit-alt-hint.txt to install the software during the build phase. This file was not updated as it doesn't need an update at this time.

The shutdown process had been plagued with an improper dismount of the root file system resulting in several errors during shutdown that would often result in a file system check utility being tripped.

This was remedied by adding extra parameters to shutdown all processes started by stage 1's script for one-shot services.

During a brief test today, the file system dismounted perfectly as it's supposed to and the machine rebooted without tripping the check utility.

Runit has come a long way for B/LFS thanks to the efforts of Stoat and Keith who have worked hard to help me get this software out to the mainstream. Do not thank me, thank them for their hard work and efforts, and thank Richard Downing for the inspiration.

To-Do-List:

We still need to get the majority of scripts finished and published for a proper mainstream deployment. If you'd like to help get Runit run scripts drafted, contact myself, Keith Hedger, and Stoat in PM, and we can discuss what is still in need of attention.

Thank you and enjoy.
Attached Files
File Type: txt setup-runit.txt (7.4 KB, 22 views)

Last edited by ReaperX7; 07-10-2014 at 08:57 PM.
 
Old 07-10-2014, 08:51 PM   #40
stoat
Member
 
Registered: May 2007
Distribution: LFS
Posts: 628

Rep: Reputation: 185Reputation: 185
With the new installation script now providing for the network script to be started in stage 1 and stopped in stage 3, there may no longer be a need for the pause applet.

Richard Downing's old blog about using Runit describes two methods of dealing with network. One is the way your new installation script now handles it (and me too now) which is as an "initialization". IOW, it's started in stage 1 and forgotten about (like LFS+SysVinit does, too). The other method is as a stage 2 supervised service with run and finish scripts (Downing said he preferred this). The pause applet appears to have been created to deal with just this issue. Otherwise, the network script would exit and be restarted over and over by runsv. All this you know, of course. For a while, I used pause with network and alsa in stage 2. Now I don't use the pause applet at all because I don't include in stage 2 anything that is not really a daemon.

So I no longer need the pause applet. But people that want network connections to be supervised would need it though. Anyway, either way it does no harm being there, but the echoes in the installation script describing the purpose of the pause applet don't need to mention network specifically now.
 
Old 07-10-2014, 09:01 PM   #41
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558

Original Poster
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
I agree Stoat. I'll leave the pause applet as-is for now, and we can maybe create an ALSA and Network script for anyone requiring supervision service on those daemons, otherwise, it's not worth the trouble. Since those are actually stage-1 stuff only, I'd feel better about not worrying about them. By 1.3 release, we should evaluate if pause is still required, and if not, it will go away, or just be commented out.

I also need to update that list of available service run files from Keith's dropbox soon.

acpid (ported - completed)
alsa-utils (covered by stage 1- not required)
apache (ported - completed)
at (ported - completed)
autofs (uncertain, but may have to add an installer for the default configuration script in blfs-bootscripts.)
avahi
bind
bluetooth (ported - completed)
bridge-utils (system service script. Might be resigned to stage 1)
cups (ported - completed)
dbus (ported -completed.)
dhclient (covered by service script in stage 1 - not required)
dhcpcd (covered by service script in stage 1- not required)
dhcpd (dhclient server)
dovecot
exim (testing script drafted. Will upload when completed.)
fcron (ported - completed)
gdm - (unneeded since GDM is part of GNOME which is now deprecated from BLFS. Deprecated. To be removed.)
gpm (ported - completed)
haveged
httpd - (Apache httpd daemon)
iptables (backported to stage 1 - not required)
ipx (system service script. Possible assignment to stage 1.)
lprng - (package was last included with BLFS 6.3. Since then has been deprecated for CUPS. To be removed.)
kdm (ported - completed)
krb5
mysql (ported - completed)
netfs
NetworkManager
nfs-client
nfs-server
ntpd (ported - completed)
php-fpm
pppoe (was part of RP-PPPOE package for BLFS 6.3 and has been deprecated. To be removed.)
postfix (ported - completed)
postgresql
proftpd
qpopper - (was part of qpopper mail server/client for BLFS 7.4. Deprecated. To be removed.)
random (assigned to stage 1 - not required)
rpcbind
rsyncd - (was last included with BLFS 6.3. Deprecated. To be removed.)
samba (ported - completed)
saslauthd (may require an installer for the default configuration script in blfs-bootscripts somehow.)
sendmail
slapd (may require an installer for the default configuration script in blfs-bootscripts somehow.)
soprano
sshd (ported -completed)
stunnel
svn
swat - (was part of Samba initially, but seems to not be used any longer. Will remove if necessary.)
sysstat (assigned to stage 1 - not required)
unbound
virtuoso
vsftpd
wicd
winbindd
wpa ( system service script. Will probably be assigned to stage 1.)
xinetd
xnmap
zenmap

Has there been any new scripts yet, or is this currently the list?

Last edited by ReaperX7; 07-16-2014 at 11:22 PM.
 
Old 07-14-2014, 08:15 PM   #42
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558

Original Poster
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Just a minor update/correction, but these lines near the bottom of the document:

Code:
echo ""
echo "Testing Runit and syncing directories"
/etc/runit/2 &
sv -w5 force-stop /var/service/*
sv exit /var/service/*
ln -sv /etc/runit/runsvdir/current /var/service
Need to be changed to:

Code:
echo ""
echo "Syncing service directories"
mkdir -pv /etc/runit/runsvdir/current
ln -sv /etc/runit/runsvdir/current /var/service
Before running the runit-setup script. Just caught this today.

Also, just a reminder that version 1.3 of the script will be coming soon, as I need to make several corrections to the script involving the copy command from /etc/rc.d/init.d to /etc/runit/init.d.

Also, I might add a copy script for the /etc/rc.d/init.d/iptables script to copy to /etc/runit/init.d/30-iptables to properly start IPTables in stage-1 after the network loads. I know a firewall for B/LFS is optional and part of BLFS rather than LFS, but it makes sense. I'll probably use an if trigger for it and the random script as well.

The fate of the pause applet is this:

Pause will be staying in case someone wants to create a managed connectivity interface for eth-0 and any other network infrastructure gateways. By default, pause will not be used with the release script, but will be installed and available for anyone wanting to setup a managed interface run script for stage-2.

Also the ALSA start sequence will be getting the change of:

Code:
# Start the audio device(s).
if [ -x /usr/sbin/soundon ]; then
   echo "Starting OSSv4 Driver"
   /usr/sbin/soundon &> /dev/null
elif [ -x /usr/sbin/alsactl ]; then
   echo "Starting ALSA Driver"
   /usr/sbin/alsactl restore &> /dev/null
fi
This is mostly aimed at supporting anyone using the OSSv4 driver as an alternative to ALSA.

The shutdown script will get similar treatments.

The ctrlaltdel script needs some extra tuning to force it to reboot rather than halt the system.

Edit:

Due to the upcoming streamlining and apparent finalizations to the project scripts, I am going to hopefully attempt to release all our current work in a single Official Release dubbed Runit-for-LFS-1.0. This will be an official release submitted to the LFS website, and hopefully published. This will include a majority of Keith's scripts, my setup script, and a new autobuild-installation script as well.

I don't have a timeline yet for this release, but it should be available very soon once I have everything in order.

Last edited by ReaperX7; 07-15-2014 at 06:31 PM.
 
Old 07-16-2014, 09:07 PM   #43
stoat
Member
 
Registered: May 2007
Distribution: LFS
Posts: 628

Rep: Reputation: 185Reputation: 185
Quote:
Originally Posted by ReaperX7

The ctrlaltdel script needs some extra tuning to force it to reboot rather than halt the system.
Try this...
Code:
#!/bin/sh

PATH=/bin:/usr/bin
MSG="System is going down in 10 seconds..."

#echo 'Disabled.' ; exit

touch /etc/runit/{stopit,reboot}
chmod 100 /etc/runit/{stopit,reboot} && echo "$MSG" | wall
/bin/sleep 10
Quote:
Originally Posted by ReaperX7

This will be an official release submitted to the LFS website, and hopefully published.
Yes, and I hope that won't be the end of it. Know why? Because I think this project should be advanced to be a stand-alone init system for LFS. Minor alterations to the hint and the installation script plus adding a custom set of initialization scripts (already done by me) would do the trick.

This system I'm using now for my main system and everyday work was built from scripts that did not install SysVinit. I installed only a few select pieces from lfs-bootscripts, and the functions of things like ipv4-static, ifup, and ifdown are incorporated into my stage 1 initialization scripts. I made a custom ifup and ifdown just for the heck of it and for simpler manual network restarts (rarely needed).

It's just a thought that may not interest anybody. It just seems like a natural goal to move towards. Anyway, you never know. A hint now, maybe in the book someday.
 
Old 07-16-2014, 10:50 PM   #44
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558

Original Poster
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Same here. My setup scripts completely avoid the sysvinit installation and only install the LFS-Bootscripts package for the service handlers and init scripts that Runit uses.

I just got my SkyDrive account figured out enough able to share things, so I'll try and get some stuff loaded soon in a tarball package to distribute here. However, the real issue is BLFS. In order to get a full release ready, I seriously want to knock out that entire list of needed run files, start scripts, and loading service handlers, so that Bruce can see we're serious about this. I want to show him we've covered not just LFS, but BLFS also.

I've been converting as many of Keith's scripts to my install paths as possible and I'm about a quarter of the way done, but the remaining service handlers and other stage 1 call offs, stage 2 run-scripts, and stage 3 shutdowns (if needed) need to be completed.

I don't want to push a release date back, but if I have to finish things beforehand, I must.

My target goal is this for the distribution:

1. lfs-runscripts-<insertdatehere>.tar.bz2 - Tarball containing all known runscripts for BLFS.
2. runit-alt-hint.txt - Guidebook to installing Runit and setting up basic directories.
3. runit-setup - Shell script to write all required stage scripts, getties, and other basics as required for the core LFS build.

So far we have 2 and 3 done. All that remains is to get #1 done.

I'm going to re-edit that list soon, to exclude any package NOT covered by BLFS or LFS at all. I'm not going to waste time on deprecated or external packages not covered by the books.

Edit: I updated the above list somewhat.

Last edited by ReaperX7; 07-16-2014 at 11:23 PM.
 
Old 07-17-2014, 03:08 AM   #45
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558

Original Poster
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Found a nice little treasure trove of scripts we can sample from.

https://github.com/voidlinux/runit-void

This is working out nicely.

I'm kind of inspired by VoidLinux's stage 1, and 3 scripts. I wonder if they can be useful on our end?

I found this article on Runit as well:

https://www.mikeperham.com/2014/07/07/use-runit/

Last edited by ReaperX7; 07-17-2014 at 03:31 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LFS with Runit (without SysV) ReaperX7 Linux From Scratch 119 07-10-2014 03:15 PM
Slax: what programs are in the official release JosephS Linux - Distributions 1 05-26-2009 01:43 PM
Mucked Around with Runit, switched back to sysvinit, and now no mouse/kb on laptop gohmifune Linux - Software 0 01-28-2009 10:09 AM
FC5 development release and FC5 official release- where is the DVD iso? smiley_lauf Fedora 11 03-13-2006 01:38 PM
10.1 64bit official release StraitFaced Mandriva 0 11-09-2004 01:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 05:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration