Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > alt.os.linux.slackware > #35639 > unrolled thread
| Started by | Joseph Rosevear <Mail@JoesLife.org> |
|---|---|
| First post | 2026-06-25 18:44 +0000 |
| Last post | 2026-07-07 10:18 -0400 |
| Articles | 13 — 7 participants |
Back to article view | Back to alt.os.linux.slackware
Survey: What do you run first after you boot Slackware? Joseph Rosevear <Mail@JoesLife.org> - 2026-06-25 18:44 +0000
Re: Survey: What do you run first after you boot Slackware? Sylvain Robitaille <syl@therockgarden.ca> - 2026-06-25 21:19 +0000
Re: Survey: What do you run first after you boot Slackware? Joseph Rosevear <Mail@JoesLife.org> - 2026-06-25 22:36 +0000
Re: Survey: What do you run first after you boot Slackware? Sylvain Robitaille <syl@therockgarden.ca> - 2026-06-26 21:38 +0000
Re: Survey: What do you run first after you boot Slackware? Joseph Rosevear <Mail@JoesLife.org> - 2026-06-29 00:17 +0000
Re: Survey: What do you run first after you boot Slackware? Lumin Etherlight <lumin+usenet@etherlight.link> - 2026-06-27 21:41 +0300
Re: Survey: What do you run first after you boot Slackware? Joseph Rosevear <Mail@JoesLife.org> - 2026-06-29 01:02 +0000
Re: Survey: What do you run first after you boot Slackware? David Chmelik <dchmelik@gmail.com> - 2026-07-03 06:57 +0000
Re: Survey: What do you run first after you boot Slackware? Joseph Rosevear <Mail@JoesLife.org> - 2026-07-04 00:36 +0000
Re: Survey: What do you run first after you boot Slackware? Henrik Carlqvist <Henrik.Carlqvist@deadspam.com> - 2026-07-06 05:50 +0000
Re: Survey: What do you run first after you boot Slackware? Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2026-07-06 15:15 +0000
Re: Survey: What do you run first after you boot Slackware? Henrik Carlqvist <Henrik.Carlqvist@deadspam.com> - 2026-07-07 05:30 +0000
Re: Survey: What do you run first after you boot Slackware? jayjwa <jayjwa@atr2.ath.cx.invalid> - 2026-07-07 10:18 -0400
| From | Joseph Rosevear <Mail@JoesLife.org> |
|---|---|
| Date | 2026-06-25 18:44 +0000 |
| Subject | Survey: What do you run first after you boot Slackware? |
| Message-ID | <111jsv9$3vd70$1@dont-email.me> |
I run, as root, a backup script with this invocation: /go_back [cheech|chong] For example, this morning I ran: /go_back chong (I have two backup hard drives. Each has a single partition with a volume label of "cheech" or "chong". I rotate them monthly, keeping the other one "offsite".)
[toc] | [next] | [standalone]
| From | Sylvain Robitaille <syl@therockgarden.ca> |
|---|---|
| Date | 2026-06-25 21:19 +0000 |
| Message-ID | <slrn113r6rj.jkq.syl@elvira.therockgarden.ca> |
| In reply to | #35639 |
initd ... -- ---------------------------------------------------------------------- Sylvain Robitaille syl@therockgarden.ca ----------------------------------------------------------------------
[toc] | [prev] | [next] | [standalone]
| From | Joseph Rosevear <Mail@JoesLife.org> |
|---|---|
| Date | 2026-06-25 22:36 +0000 |
| Message-ID | <111kai2$3vd70$2@dont-email.me> |
| In reply to | #35640 |
On Thu, 25 Jun 2026 21:19:47 GMT, Sylvain Robitaille wrote: > initd ... syl@therockgarden.ca wrote: > initd ... Do you run a script called initd? Manually, or is it automated? Perhaps you mean that the machines you administer are configured to run initd when they boot? I hadn't considered the system administration point of view. If I don't run the backups manually, they don't get done. I have other tools too that I run daily. For example, after running go_back I start X using: /mnt/joe_root/begin startx This configures an environment which is inherited by X. -Joe
[toc] | [prev] | [next] | [standalone]
| From | Sylvain Robitaille <syl@therockgarden.ca> |
|---|---|
| Date | 2026-06-26 21:38 +0000 |
| Message-ID | <slrn113tsao.a3q.syl@elvira.therockgarden.ca> |
| In reply to | #35641 |
On Thu, 25 Jun 2026 21:19:47 GMT, Sylvain Robitaille wrote: > initd ... Hrmmmm ... I *should* have said "init", not "initd" ... brain fart? On 2026-06-25, Joseph Rosevear replied: > Do you run a script called initd? Manually, or is it automated? It's automated. It is, in fact, the first process run on "normal" Linux, and traditionally, Unix systems. This is notwithstanding the systemd-based systems which have replaced init with, effectively, a different kind of init, and the silly Ubuntu thing that predated systemd ... (scratches head) ... oh yeah, "upstart". > Perhaps you mean that the machines you administer are configured > to run initd when they boot? They indeed are ... That (well, "init") is what the Linux kernel looks to run once it boots. > I hadn't considered the system administration point of view. If I > don't run the backups manually, they don't get done. Amusingly, I would word that same sentiment as "if I don't schedule the backups to run automatically, they don't get done." > I have other tools too that I run daily. For example, after running > go_back I start X using: > > /mnt/joe_root/begin startx My workstation and laptops do boot into run-level 4, where X starts up. I'm pretty sure that I don't have any special environment setup prior to X starting, but I'd have to review local documentation to say that with complete certainty. Now. to answer the question that I *think* you were really asking, I'm afraid that it's not really any more informative than my "init" answer, though it's just as truthful: whatever the system in question was running just prior to my shutting it down. The systems have their purposes: mail server, web server, etc. When they're booted, they go right back to serving those purposes. The workstation and laptops go back to running X and waiting for me to ... do whatever I'm going to do next. In my case, these systems are up 24x7, reboot only for patch cycles, and the majority of them (save for a couple of virtuals running "other" Linux) are running Slackware, so there isn't really a "when I boot into Slackware". It occurred to me, only after reading the content of your original post, that you were probably aiming the question at folks who aren't running Slackware Linux 24x7 ... I chose to be a smart-ass and answer anyway ... -- ---------------------------------------------------------------------- Sylvain Robitaille syl@therockgarden.ca ----------------------------------------------------------------------
[toc] | [prev] | [next] | [standalone]
| From | Joseph Rosevear <Mail@JoesLife.org> |
|---|---|
| Date | 2026-06-29 00:17 +0000 |
| Message-ID | <111sdjc$3ppot$1@dont-email.me> |
| In reply to | #35648 |
On Fri, 26 Jun 2026 21:38:32 GMT, Sylvain Robitaille wrote: ... > My workstation and laptops do boot into run-level 4, where X starts up. > I'm pretty sure that I don't have any special environment setup prior to > X starting, but I'd have to review local documentation to say that with > complete certainty. I use run-level 3. Configuring the environment before starting X is handy. For example my MWM configuration includes a specification that causes "Setup" to appear in the root menu (available by right-clicking the desktop). Clicking "Setup" in the root menu invokes function wm_setup which, thanks to prior execution of /mnt/joe_root/begin, is available in the current environment. > Now. to answer the question that I *think* you were really asking, > I'm afraid that it's not really any more informative than my "init" > answer, though it's just as truthful: whatever the system in question > was running just prior to my shutting it down. The systems have their > purposes: mail server, web server, etc. When they're booted, they go > right back to serving those purposes. The workstation and laptops go > back to running X and waiting for me to ... do whatever I'm going to do > next. > > In my case, these systems are up 24x7, reboot only for patch cycles, and > the majority of them (save for a couple of virtuals running "other" > Linux) are running Slackware, so there isn't really a "when I boot into > Slackware". > > It occurred to me, only after reading the content of your original post, > that you were probably aiming the question at folks who aren't running > Slackware Linux 24x7 ... I chose to be a smart-ass and answer anyway > ... That's OK, I deserved it. Not everyone boots daily like I do. I can understand that. With a fleet of machines to manage, you need global solutions. Yet other paradigms might have use cases. For example, my wife and I currently run a tweaked-clone version of Slackware from a flash drive on our respective machines. See https://rosevearsoftware.com/products/sam/libraries/Zombie -Joe
[toc] | [prev] | [next] | [standalone]
| From | Lumin Etherlight <lumin+usenet@etherlight.link> |
|---|---|
| Date | 2026-06-27 21:41 +0300 |
| Message-ID | <cimBpSNlbhF/mtNHsKWqE8Cbj9NYhFjH@etherlight.link> |
| In reply to | #35639 |
After the typical system services, local
mail server (postfix), news server (leafnode), my
personal Wireguard VPNs, and other rc.local stuff,
I usually run startx, booting to dwm, then follow
that with st instances running GNU screen, then an
Emacs server instance. I usually also start music
through some bash functions that wrap mpv. Check
my plain-text task list and journal in Emacs, pick
something I want to do, and start chugging along.
Nowadays, I mostly use my personal text editor, an
ed-like written from scratch, more than Emacs, and
I use my fork of suckless surf for web browsing,
but I do less and less of that in recent days. I
still use Emacs, for GNUS mail and news, and for
the one-off crazy macro here and there. I connect
to a VPS that runs irssi for IRC access. SSH is
definitely something I use a lot, to administer
dozens of other Slackware machines.
This accounts for most of my Slackware usage :-)
(and computer usage in general).
Best Regards,
Lumin Etherlight
[toc] | [prev] | [next] | [standalone]
| From | Joseph Rosevear <Mail@JoesLife.org> |
|---|---|
| Date | 2026-06-29 01:02 +0000 |
| Message-ID | <111sg7p$3ppot$2@dont-email.me> |
| In reply to | #35652 |
On Sat, 27 Jun 2026 21:41:56 +0300, Lumin Etherlight wrote: > After the typical system services, local > mail server (postfix), news server (leafnode), my personal Wireguard > VPNs, and other rc.local stuff, > I usually run startx, booting to dwm, then follow that with st > instances running GNU screen, then an Emacs server instance. I > usually also start music through some bash functions that wrap mpv. > Check my plain-text task list and journal in Emacs, pick something I > want to do, and start chugging along. > Nowadays, I mostly use my personal text editor, an ed-like written > from scratch, more than Emacs, and I use my fork of suckless surf > for web browsing, > but I do less and less of that in recent days. I still use Emacs, > for GNUS mail and news, and for the one-off crazy macro here and > there. I connect to a VPS that runs irssi for IRC access. SSH is > definitely something I use a lot, to administer dozens of other > Slackware machines. > > This accounts for most of my Slackware usage :-) > (and computer usage in general). > > > Best Regards, > Lumin Etherlight Hey, Lumin! Thanks for your input. It was interesting to read about how you use Slackware. For example, I had never heard of suckless software, st or GNU screen. Interesting. And I was thinking about IRC. I actually used it a few times. Any good Slackware information there? My editor of choice is joe (Joe's Own Editor), which by coincidence is also my name. But I like it. Fast and easy. And I had to look up "VPS". I didn't know there was such a thing. Thanks again! -Joe
[toc] | [prev] | [next] | [standalone]
| From | David Chmelik <dchmelik@gmail.com> |
|---|---|
| Date | 2026-07-03 06:57 +0000 |
| Message-ID | <1127mgu$34o8n$2@dont-email.me> |
| In reply to | #35639 |
On Thu, 25 Jun 2026 18:44:57 -0000 (UTC), Joseph Rosevear wrote: > I run, as root, a backup script with this invocation: > > /go_back [cheech|chong] > > For example, this morning I ran: > > /go_back chong > > (I have two backup hard drives. Each has a single partition with a > volume label of "cheech" or "chong". I rotate them monthly, keeping the > other one "offsite".) #!/bin/bash # # /etc/rc.d/rc.local: Local system initialization script. # # Put any local startup commands in here. Also, if you have # anything that needs to be run at shutdown time you can # make an /etc/rc.d/rc.local_shutdown script and put those # commands in there. # Increase allowed number of open files. #ulimit -n 4096 # Stop control groups. if [ -x /usr/local/bin/cgstop ]; then /usr/local/bin/cgstop 1>/dev/null 2>&1& fi # Start power-profiles. Might be automatic. if [ -x /etc/rc.d/rc.power-profiles ]; then /etc/rc.d/rc.power-profiles start 1>/dev/null 2>&1& fi # Start/mount ZFS. Might be automatic except Open Solaris/Illumos # cleanup. if [ -x /etc/rc.d/rc.zfs ]; then modprobe zfs& /etc/rc.d/rc.zfs restart& zpool export -f rpool 1>/dev/null 2>&1& rmdir /export 1>/dev/null 2>&1& fi # Clean /tmp. Should change to wait for putpkgs before removing. [ -x putpkgs ] && putpkgs 1>/dev/null 2>&1& # Put *SBo*z in home. [ -x cleanstale ] && cleanstale 1>/dev/null 2>&1& [ -x clean_tmp ] && clean_tmp 1>/dev/null 2>&1& rm -rf /tmp/.[A-Za-z0-9]*& rm -rf /tmp/[A-Za-z0-9]*& cp /root/.directory.tmp /tmp/.directory& # Remove old saved files. #su - d -c rmold& # Update ?locate database. updatedb 1>/dev/null 2>&1& # audio volumes #alsactl restore 1>/dev/null 2>&1 # Provide DHCP w/NIC. Might be automatic, partially. #ifconfig eth1 up 10.0.0.1& #dhcpd eth1& #/etc/rc.d/rc.firewall& # Start the DHCP server. #if [ -x /etc/rc.d/rc.dhcpd ]; then # /etc/rc.d/rc.dhcpd start #fi #[...] # Mount Slackware DVD (automatically done from /etc/fstab). #[ -d /home/d/math/ware/slackware ] && mount /scd 1>/dev/null 2>&1& #[...] # Start dictd (done in custom rc.zfs) #if [ -x /etc/rc.d/rc.dictd ]; then # /etc/rc.d/rc.dictd start 2>&1& #fi # Make .xinitrc. su -d -c "cp .xinitrc.xfce.slack .xinitrc" # Make X (XFCE, KDE) directory. mkdir /run/user/1000& chown d:users /run/user/1000& # Fix Chromium temporary storage. chmod 1777 /dev/shm& #[...] # Speed up for desktop. mount -t debugfs none /sys/kernel/debug 2>&1& echo full>/sys/kernel/debug/sched/preempt 2>&1& #Maybe obsolete. mount --rbind /dev /devuan/dev 2>&1& mount --types proc /proc /devuan/proc 2>&1& mount --rbind /sys /devuan/sys 2>&1& mount --rbind /boot/efi /devuan/boot/efi 2>&1& echo chroot>>/devuan/etc/debian_chroot mount -o remount,dev,exec /devuan 2>&1& mount --rbind /dev /gentoo/dev 2>&1& mount --types proc /proc /gentoo/proc 2>&1& mount --rbind /sys /gentoo/sys 2>&1& mount --rbind /boot/efi /gentoo/boot/efi 2>&1& mount -o remount,dev,exec /gentoo 2>&1&
[toc] | [prev] | [next] | [standalone]
| From | Joseph Rosevear <Mail@JoesLife.org> |
|---|---|
| Date | 2026-07-04 00:36 +0000 |
| Message-ID | <1129ki6$3ij1k$1@dont-email.me> |
| In reply to | #35677 |
On Fri, 3 Jul 2026 06:57:35 -0000 (UTC), David Chmelik wrote: ... > #!/bin/bash # > # /etc/rc.d/rc.local: Local system initialization script. > # > # Put any local startup commands in here. Also, if you have # anything > that needs to be run at shutdown time you can # make an > /etc/rc.d/rc.local_shutdown script and put those # commands in there. > > # Increase allowed number of open files. > #ulimit -n 4096 ... Fabulous! I can see by the above, and the many other instances that you shared, that you made good use of /etc/rc.d/rc.local. I also use /etc/rc.d/rc.local! -Joe
[toc] | [prev] | [next] | [standalone]
| From | Henrik Carlqvist <Henrik.Carlqvist@deadspam.com> |
|---|---|
| Date | 2026-07-06 05:50 +0000 |
| Message-ID | <112ffme$1n18j$1@dont-email.me> |
| In reply to | #35679 |
On Sat, 04 Jul 2026 00:36:24 +0000, Joseph Rosevear wrote: > I also use /etc/rc.d/rc.local! My rc.local is rather short: -8<----------------------------------- #!/bin/sh # # /etc/rc.d/rc.local: Local system initialization script. # # Put any local setup commands in here: if [ -x /usr/local/etc/rc.d/rc.local ]; then . /usr/local/etc/rc.d/rc.local fi -8<----------------------------------- However, my other rc.local is longer: -8<----------------------------------- #!/bin/sh # # /usr/local/etc/rc.d/rc.local: Local system initialization script. # # Any custom things that has to be started absolutely first if [ -x /usr/local/etc/rc.d/rc.custom_first ]; then . /usr/local/etc/rc.d/rc.custom_first fi # openvpn should be started early as logging depends upon it. if [ -x /usr/local/etc/rc.d/rc.openvpn ]; then . /usr/local/etc/rc.d/rc.openvpn fi # the qemu module and settings does not depend upon automount if [ -x /usr/local/etc/rc.d/rc.qemu ]; then . /usr/local/etc/rc.d/rc.qemu fi # The sound settings does not depend upon automount if [ -x /usr/local/etc/rc.d/rc.alsa ]; then . /usr/local/etc/rc.d/rc.alsa fi # Automount should be started before any other which might depend on it. if [ -x /usr/local/etc/rc.d/rc.automount ]; then . /usr/local/etc/rc.d/rc.automount fi if [ -x /usr/local/etc/rc.d/rc.nscd ]; then . /usr/local/etc/rc.d/rc.nscd fi if [ -x /usr/local/etc/rc.d/rc.rwhod ]; then . /usr/local/etc/rc.d/rc.rwhod fi if [ -x /usr/local/etc/rc.d/rc.smartd ]; then . /usr/local/etc/rc.d/rc.smartd fi if [ -x /usr/local/etc/rc.d/rc.ntpd ]; then . /usr/local/etc/rc.d/rc.ntpd fi if [ -x /usr/local/etc/rc.d/rc.printers ]; then . /usr/local/etc/rc.d/rc.printers fi if [ -x /usr/local/etc/rc.d/rc.firewire ]; then . /usr/local/etc/rc.d/rc.firewire fi if [ -x /usr/local/etc/rc.d/rc.lldpd ]; then . /usr/local/etc/rc.d/rc.lldpd fi if [ -x /usr/local/etc/rc.d/rc.nv_agentx ]; then . /usr/local/etc/rc.d/rc.nv_agentx fi if [ -x /usr/local/etc/rc.d/rc.lmsensors ]; then . /usr/local/etc/rc.d/rc.lmsensors fi # Big brother is started late to give automount some time to start... if [ -x /usr/local/etc/rc.d/rc.b_brother ]; then . /usr/local/etc/rc.d/rc.b_brother fi # cpufreq is set after Big Brother to show Big Brother highest freq if [ -x /usr/local/etc/rc.d/rc.cpufreq ]; then . /usr/local/etc/rc.d/rc.cpufreq fi # If connected to gigev cameras som net tweaking might be needed if [ -x /usr/local/etc/rc.d/rc.nettweak ]; then . /usr/local/etc/rc.d/rc.nettweak fi # Any custom things that can be started at this late stage if [ -x /usr/local/etc/rc.d/rc.custom ]; then . /usr/local/etc/rc.d/rc.custom fi # KDM should be started last! if [ -x /usr/local/etc/rc.d/rc.kdm ]; then . /usr/local/etc/rc.d/rc.kdm fi # Do not start anything else after KDM! -8<----------------------------------- regards Henrik
[toc] | [prev] | [next] | [standalone]
| From | Lew Pitcher <lew.pitcher@digitalfreehold.ca> |
|---|---|
| Date | 2026-07-06 15:15 +0000 |
| Message-ID | <112ggqt$219e8$1@dont-email.me> |
| In reply to | #35639 |
On Thu, 25 Jun 2026 18:44:57 +0000, Joseph Rosevear wrote:
> I run, as root, a backup script with this invocation:
>
> /go_back [cheech|chong]
>
> For example, this morning I ran:
>
> /go_back chong
>
> (I have two backup hard drives. Each has a single partition with a
> volume label of "cheech" or "chong". I rotate them monthly, keeping the
> other one "offsite".)
OK, others have shared, and I will as well.
I run three Slackware systems, and each has unique startup requirements.
On my desktop/development machine, I start up several daemons through
/etc/inittab, and perform more operations in /etc/rc.d/rc.local
In inittab, I
# Default runlevel. (Do not set to 0 or 6)
id:4:initdefault:
# System initialization (runs when system boots).
si:S:sysinit:/etc/rc.d/rc.S
# Script to run when going single user (runlevel 1).
su:1S:wait:/etc/rc.d/rc.K
# 2020-07-16: Start APC UPS daemon now
b1:1S2345:wait:/etc/rc.d/rc.apcupsd start
# Script to run when going multi user.
rc:2345:wait:/etc/rc.d/rc.M
# What to do at the "Three Finger Salute".
ca::ctrlaltdel:/sbin/shutdown -t5 -r now
# 2020-07-16: Stop APC UPS daemon now
b2:06:wait:/etc/rc.d/rc.apcupsd stop
# Runlevel 0 halts the system.
l0:0:wait:/etc/rc.d/rc.0
# Runlevel 6 reboots the system.
l6:6:wait:/etc/rc.d/rc.6
# What to do when power fails.
pf::powerfail:/sbin/genpowerfail start
# If power is back, cancel the running shutdown.
pg::powerokwait:/sbin/genpowerfail stop
# These are the standard console login getties in multiuser mode:
c1:12345:respawn:/sbin/agetty --noclear 38400 tty1 linux
c2:12345:respawn:/sbin/agetty 38400 tty2 linux
c3:12345:respawn:/sbin/agetty 38400 tty3 linux
c4:12345:respawn:/sbin/agetty 38400 tty4 linux
c5:12345:respawn:/sbin/agetty 38400 tty5 linux
c6:12345:respawn:/sbin/agetty 38400 tty6 linux
# Runlevel 4 also starts /etc/rc.d/rc.4 to run a display manager for X.
# Display managers are preferred in this order: gdm, kdm, xdm
x1:4:respawn:/etc/rc.d/rc.4
# 2020-07-12: Start up VoiceOver once systemwide pulseaudio initialized
vo:2345:respawn:/etc/rc.d/rc.voxd
# 2022-05-29: Start CallNotice call notification, after voxd started
cn:2345:respawn:/etc/rc.d/rc.CallNotice
# End of /etc/inittab
Note the dated comments:
- with b1, I start a UPS monitor daemon,
- with b2, I stop the UPS monitor daemon,
- witn vo, I start a custom text-to-speech daemon, and
- with cn, I start a custom Asterisk "incoming call" notification
script that uses the custom text-to-speech daemon
In /etc/rc.d/rc.local, I set up a networking bridge device
and start up a couple of lxc containers.
On Merlin (my router and fileserver), I have similar customizations:
In /etc/inittab, I
- start (and stop) the UPS monitor daemon, and I
- initialize and set the motherboard sensors
In /etc/rc.d/rc.local, I
- set up some routes to devices on my LANs
- start an MQTT broker daemon
- start a sendmail milter daemon
- start a sendmail spam filter daemon, and
- start up my connection to my ISP
Finally, on Rutherford (my "home" server and Telephony platform), I
have more of the same:
In /etc/inittab, I
- start (and stop) the UPS monitor daemon, and I
and, in /etc/rc.d/rc.local, I
- sync the system clock to my clock server
- start an MQTT broker daemon, and
- start the Asterisk telephony server daemon
--
Lew Pitcher
"In Skills We Trust"
Not LLM output - I'm just like this.
[toc] | [prev] | [next] | [standalone]
| From | Henrik Carlqvist <Henrik.Carlqvist@deadspam.com> |
|---|---|
| Date | 2026-07-07 05:30 +0000 |
| Message-ID | <112i2tp$2khjf$1@dont-email.me> |
| In reply to | #35687 |
On Mon, 06 Jul 2026 15:15:41 +0000, Lew Pitcher wrote:
> and, in /etc/rc.d/rc.local, I
> - sync the system clock to my clock server
I also have my /usr/local/etc/rc.d/rc.ntpd for that:
-8<------------------------------
#!/bin/sh
if [ -x /usr/sbin/ntpd ]; then
if [ -x /usr/sbin/ntpdate ]; then
/usr/sbin/ntpdate balrog
fi
/usr/sbin/ntpd
fi
-8<------------------------------
Since a few years, ntpd has the option "-g" which no longer would make it
necessary to call ntpdate before ntpd. However, I still stick to my old
school way of starting ntpd. I keep the stock /etc/rc.d/rc.ntpd script as
non executable, but in many cases that script would do the job today.
regards Henrik
[toc] | [prev] | [next] | [standalone]
| From | jayjwa <jayjwa@atr2.ath.cx.invalid> |
|---|---|
| Date | 2026-07-07 10:18 -0400 |
| Message-ID | <87bjcikhmb.fsf@atr2.ath.cx> |
| In reply to | #35690 |
Henrik Carlqvist <Henrik.Carlqvist@deadspam.com> writes:
> Since a few years, ntpd has the option "-g" which no longer would make it
> necessary to call ntpdate before ntpd.
ntpd, on Current at least, has its startup script pull in
/etc/default/ntp, in which you can set the "-g" option. It might be the
default for all I know. This is mine:
NTPD_OPTS="-g -p /run/ntpd.pid -u ntp:ntp"
Since I'm answering this thread anyway, here's my rc.local:
#!/bin/bash
#
# /etc/rc.d/rc.local: Local system initialization script.
#
# Put any local startup commands in here. Also, if you have
# anything that needs to be run at shutdown time you can
# make an /etc/rc.d/rc.local_shutdown script and put those
# commands in there.
# Make sure these filesystems have the proper attributes as
# per /etc/fstab. Mounting efivarfs with rw enabled is dangerous.
mount -o remount efivarfs
mount -o remount proc
if [ -x /etc/rc.d/rc.redis ]; then
# Start Redis daemon
echo "Starting Redis daemon: /etc/rc.d/rc.redis start"
/etc/rc.d/rc.redis start
fi
# Pulse Audio has a HOME set in /etc/passwd, but no actual
# directory corresponding to it. Create it now.
mkdir -p /var/run/pulse
chgrp pulse /var/run/pulse
# Start system monitoring daemon as root. It will drop privs.
# If it is started by a user and gets whacked, they will get
# user privs of that user. Better to be run as 'nobody'.
# See /etc/gkrellmd.conf for options
gkrellmd
## EOF
Explaination: for some reason, efivars remains r/w by default. If it
stays that way, an errant command that writes into the /sys area where
the efivars are could scribble over them, bricking the firmware.
efivarfs /sys/firmware/efi/efivars efivarfs noauto,ro
For /proc, I use 'hidepid' so users can't spy each other's command
lines. For some reason, this doesn't keep set even though it's in fstab:
proc /proc proc hidepid=2
Checking the passwd file (pwck) will generate an error for user 'pulse'
due to no home being there on startup because it gets deleted on reboot,
so that fixes that issue. Redis and gkrellmd are self-explainitory.
After that, in /etc/default/tmp-cleanup, I have:
# You may also run a custom cleanup script by pointing to it here:
TMP_REMOVE_SCRIPT=/usr/local/sbin/mightytidy.py
Which was posted to LQ in a thread about said topic and is duplicated
here:
#!/usr/bin/python3
## Remove various temporary files from the system. Ideally, these
## files are left over from applications that do not remove their
## own temp files on closure. This script should be run at boot
## time, hooked into the system startup scripts.
##
## $Id: mightytidy.py,v 1.2 2025/11/06 17:19:35 jayjwa Exp $
import re
import os
import shutil
# The file regexes to search for, in an expandable list. Uses raw strings.
# See https://thepythonguru.com/python-regular-expression/index.html .
hitList = [ r'chaos_stream$', r'chaos_packet$', r'dolphin\.[a-zA-Z0-9]{6}$',
r'dbus-[a-zA-Z0-9]{10}$', r'hsperfdata_\w+$', r'u*screens$',
r'MozillaBackgroundTask-[a-zA-Z0-9]{16}-removeDirectory$',
r'gimp$', r'i2p-.{8}\.tmp$', r'tmux-[0-9]+$', r'mozilla_[a-zA-Z0-9]+$',
r'palemoon_\w+$', r'\.wine-[0-9]+$', r'.mount_libre[a-zA-Z]+$',
r'.xrdp$', r'decnetapi.sock$' ]
# Whether to actually delete objects or not. Useful for debugging.
# False = delete, True = don't really delete (dry run)
dryRun = False
def cleanTmp():
'''Remove various items from system tmp directory that match a set list.'''
TEMP = "/tmp"
# Walk the TEMP directory to find present entities
for currentEntry in os.listdir( TEMP ):
for possibleMatch in hitList:
# Match pattern against directory content
if re.match( possibleMatch, currentEntry ):
# Is it a directorty? Call shutil.rmtree on it. shutil
# won't bark if we can't actually delete it for some reason
if os.path.isdir( os.path.join( TEMP, currentEntry ) ):
if dryRun:
print( f"Directory match on {os.path.join( TEMP, currentEntry )}" )
else:
shutil.rmtree( os.path.join( TEMP, currentEntry ), ignore_errors=True )
# It is a file or socket. Use os.remove, ignore errors
# if we can't remove it
else:
if dryRun:
print( f"File match on {os.path.join( TEMP, currentEntry )}" )
else:
try:
os.remove( os.path.join( TEMP, currentEntry ) )
except:
pass
if __name__ == "__main__":
cleanTmp()
## $Log: mightytidy.py,v $
## Revision 1.2 2025/11/06 17:19:35 jayjwa
## Add decnetapi.sock (pydecnet) file to hitlist so that pydecnet starts
## on reboot without manual intervention to remove said file.
##
## Revision 1.1 2025/09/27 17:54:11 jayjwa
## Initial revision
##
## EOF
You can increase 'hitList' as needed. Personally, I like to keep /tmp
until I decide to remove things from it because I park files there
alot. The script only deletes junk that gets left behind and nothing
else.
After *that*, I start Privoxy + Tor + I2p routers for darknet
access. Other networking protocols I start by hand, just in case
something breaks.
--
PGP Key ID: 781C A3E2 C6ED 70A6 B356 7AF5 B510 542E D460 5CAE
"The Internet should always be the Wild West!"
[toc] | [prev] | [standalone]
Back to top | Article view | alt.os.linux.slackware
csiph-web