summaryrefslogtreecommitdiffstats
path: root/testing/source/pkgtools/scripts/setup.services
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2018-06-19 22:35:25 +0000
committer Eric Hameleers <alien@slackware.com>2018-06-20 09:00:31 +0200
commit7e5ee73de954e6c084195b0a1fa6ef01a78d092f (patch)
tree7219c86cd7bc94b145e6e31779a1654ba5998e4c /testing/source/pkgtools/scripts/setup.services
parenta27618d0d02506153de111da1055a5af43245d13 (diff)
downloadcurrent-7e5ee73de954e6c084195b0a1fa6ef01a78d092f.tar.gz
current-7e5ee73de954e6c084195b0a1fa6ef01a78d092f.tar.xz
Tue Jun 19 22:35:25 UTC 201820180619223525
a/acl-2.2.53-x86_64-1.txz: Upgraded. a/attr-2.4.48-x86_64-1.txz: Upgraded. n/gnupg-1.4.23-x86_64-1.txz: Upgraded. Sanitize the diagnostic output of the original file name in verbose mode. By using a made up file name in the message it was possible to fake status messages. Using this technique it was for example possible to fake the verification status of a signed mail. For more information, see: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-12020 (* Security fix *) x/libXaw3d-1.6.3-x86_64-1.txz: Upgraded. x/libinput-1.11.1-x86_64-1.txz: Upgraded. x/xf86-input-mouse-1.9.3-x86_64-1.txz: Upgraded. testing/packages/pkgtools-15.0-noarch-20.txz: Rebuilt. This update is a bit scarier than usual, so we're going to test it here first and then move it into the main tree in a couple of days if there are no serious bug reports. It's well-tested here, and works with the slackpkg that's in -current now, but I don't know about slackpkg+ so that's another reason to let it cool down here first. The purpose of this update is to migrate the package database and directories from /var/log to /var/lib/pkgtools. /var/log was never a good place for this data, as it is considered by many to be a directory that could be wiped to free up some space. Originally the package database was in /var/adm, but the FSSTND (later FHS) group decided that directory should be a symlink to /var/log, and I went along with that since it was years ago and I was a n00b and didn't know any better. /var/lib/pkgtools will be a better and safer location. The removed_packages and removed_scripts directories are really just logs that aren't actually used for anything - those will remain under /var/log, but moved into /var/log/pkgtools. Everything under /var/log will be considered potentially non-permanent by the pkgtools - if any directories or symlinks disappear from there, the pkgtools will automatically recreate them as needed. In fact, the migration process will create symlinks from all the old directory locations to the new ones, so anything that expects the old locations (including slackpkg, for now) should continue to work. Once this moves into the main tree, the plan is to fix other packages to use the new installer script directory (/var/lib/pkgtools/setup) and change the installer and slackpkg to use the new native locations for everything. When slackpkg is changed over to use the new native locations, I'll also make sure to float that in testing/ for a few days before moving it to the main tree to avoid more unintentional disruption to slackpkg+ users. Be aware that the package database migration is a one-way operation, but even so if you later downgrade to an older version of the pkgtools it will still work through the compatibility symlinks.
Diffstat (limited to 'testing/source/pkgtools/scripts/setup.services')
-rw-r--r--testing/source/pkgtools/scripts/setup.services342
1 files changed, 342 insertions, 0 deletions
diff --git a/testing/source/pkgtools/scripts/setup.services b/testing/source/pkgtools/scripts/setup.services
new file mode 100644
index 000000000..2e83cb932
--- /dev/null
+++ b/testing/source/pkgtools/scripts/setup.services
@@ -0,0 +1,342 @@
+#!/bin/sh
+#BLURB="Select/deselect system daemons (services)"
+TMP=/var/lib/pkgtools/setup/tmp
+if [ ! -d $TMP ]; then
+ mkdir -p $TMP
+fi
+T_PX="$1"
+cd $T_PX
+rm -f $TMP/tmpscript
+
+cat << EOF > $TMP/tmpscript
+dialog --title "CONFIRM STARTUP SERVICES TO RUN" --item-help --checklist \\
+"The selected services will be started at boot time. If you \\
+don't need them, you may unselect them to turn them off (which may improve \\
+overall system security). You may also choose to start services that are \\
+not run by default, but be aware that more services means less security. \\
+Use the spacebar to select or unselect the services you wish to run. \\
+Recommended choices have been preselected. \\
+Press the ENTER key when you are finished." \\
+20 75 7 \\
+EOF
+
+if [ -r etc/rc.d/rc.atalk ]; then
+ if [ -x etc/rc.d/rc.atalk ]; then
+ RC_ATALK=on
+ else
+ RC_ATALK=off
+ fi
+ cat << EOF >> $TMP/tmpscript
+ "rc.atalk" "Netatalk Appletalk file/print server" $RC_ATALK "The Netatalk server is a file and print server for Macintosh networks." \\
+EOF
+fi
+
+if [ -r etc/rc.d/rc.atd ]; then
+ if [ -x etc/rc.d/rc.atd ]; then
+ RC_ATD=on
+ else
+ RC_ATD=off
+ fi
+ cat << EOF >> $TMP/tmpscript
+ "rc.atd" "Schedules jobs for later" $RC_ATD "The at daemon schedules jobs to be run at a specified time." \\
+EOF
+fi
+
+if [ -r etc/rc.d/rc.bind ]; then
+ if [ -x etc/rc.d/rc.bind ]; then
+ RC_BIND=on
+ else
+ RC_BIND=off
+ fi
+ cat << EOF >> $TMP/tmpscript
+ "rc.bind" "BIND (Domain Name System) server" $RC_BIND "BIND (Berkeley Internet Name Domain) is a Domain Name System (DNS) server." \\
+EOF
+fi
+
+if [ -r etc/rc.d/rc.crond ]; then
+ if [ -x etc/rc.d/rc.crond ]; then
+ RC_CROND=on
+ else
+ RC_CROND=off
+ fi
+ cat << EOF >> $TMP/tmpscript
+ "rc.crond" "Time based job scheduler" $RC_CROND "The cron daemon schedules jobs to run at fixed times, dates, or intervals." \\
+EOF
+fi
+
+if [ -r etc/rc.d/rc.cups ]; then
+ if [ -x etc/rc.d/rc.cups ]; then
+ RC_CUPS=on
+ else
+ RC_CUPS=off
+ fi
+ cat << EOF >> $TMP/tmpscript
+ "rc.cups" "CUPS print server" $RC_CUPS "The Common UNIX Printing system (print spooler choice #1)." \\
+EOF
+fi
+
+if [ -r etc/rc.d/rc.dnsmasq ]; then
+ if [ -x etc/rc.d/rc.dnsmasq ]; then
+ RC_DNSMASQ=on
+ else
+ RC_DNSMASQ=off
+ fi
+ cat << EOF >> $TMP/tmpscript
+ "rc.dnsmasq" "dnsmasq DHCP/DNS server" $RC_DNSMASQ "dnsmasq provides DNS and DHCP service to a LAN." \\
+EOF
+fi
+
+if [ -r etc/rc.d/rc.dovecot ]; then
+ if [ -x etc/rc.d/rc.dovecot ]; then
+ RC_DOVECOT=on
+ else
+ RC_DOVECOT=off
+ fi
+ cat << EOF >> $TMP/tmpscript
+ "rc.dovecot" "Dovecot IMAP/POP3 server" $RC_DOVECOT "Dovecot provides remote mailbox access for email clients." \\
+EOF
+fi
+
+if [ -r etc/rc.d/rc.fuse ]; then
+ if [ -x etc/rc.d/rc.fuse ]; then
+ RC_FUSE=on
+ else
+ RC_FUSE=off
+ fi
+ cat << EOF >> $TMP/tmpscript
+ "rc.fuse" "Filesystem in Userspace library" $RC_FUSE "FUSE is an interface to allow userspace programs to use filesystems." \\
+EOF
+fi
+
+if [ -r etc/rc.d/rc.hald ]; then
+ if [ -x etc/rc.d/rc.hald ]; then
+ RC_HALD=on
+ else
+ RC_HALD=off
+ fi
+ cat << EOF >> $TMP/tmpscript
+ "rc.hald" "Hardware Abstraction Layer" $RC_HALD "HAL makes access to CD/DVD drives and USB devices easier." \\
+EOF
+fi
+
+if [ -r etc/rc.d/rc.hplip ]; then
+ if [ -x etc/rc.d/rc.hplip ]; then
+ RC_HPLIP=on
+ else
+ RC_HPLIP=off
+ fi
+ cat << EOF >> $TMP/tmpscript
+ "rc.hplip" "HP printer/scanner daemons" $RC_HPLIP "Programs used to run printers and scanners from Hewlett Packard." \\
+EOF
+fi
+
+if [ -r etc/rc.d/rc.httpd ]; then
+ if [ -x etc/rc.d/rc.httpd ]; then
+ RC_HTTPD=on
+ else
+ RC_HTTPD=off
+ fi
+ cat << EOF >> $TMP/tmpscript
+ "rc.httpd" "The Apache web server" $RC_HTTPD "Apache, the most widely used web server on the net." \\
+EOF
+fi
+
+if [ -r etc/rc.d/rc.inetd ]; then
+ if [ -x etc/rc.d/rc.inetd ]; then
+ RC_INETD=on
+ else
+ RC_INETD=off
+ fi
+ cat << EOF >> $TMP/tmpscript
+ "rc.inetd" "The BSD Inetd daemon" $RC_INETD "Inetd daemon (this allows: time, ftp, comsat, talk, finger, and auth)." \\
+EOF
+fi
+
+if [ -r etc/rc.d/rc.ip_forward ]; then
+ if [ -x etc/rc.d/rc.ip_forward ]; then
+ RC_IP_FORWARD=on
+ else
+ RC_IP_FORWARD=off
+ fi
+ cat << EOF >> $TMP/tmpscript
+ "rc.ip_forward" "Activate IP packet forwarding" $RC_IP_FORWARD "Packet forwarding allows your Linux machine to act as a router." \\
+EOF
+fi
+
+if [ -r etc/rc.d/rc.lprng ]; then
+ if [ -x etc/rc.d/rc.lprng ]; then
+ RC_LPRNG=on
+ else
+ RC_LPRNG=off
+ fi
+ cat << EOF >> $TMP/tmpscript
+ "rc.lprng" "LPRng print server" $RC_LPRNG "The LPRng printing system (print spooler choice #2)." \\
+EOF
+fi
+
+if [ -r etc/rc.d/rc.messagebus ]; then
+ if [ -x etc/rc.d/rc.messagebus ]; then
+ RC_MESSAGEBUS=on
+ else
+ RC_MESSAGEBUS=off
+ fi
+ cat << EOF >> $TMP/tmpscript
+ "rc.messagebus" "D-Bus system message bus" $RC_MESSAGEBUS "Used for interprocess communication and coordination." \\
+EOF
+fi
+
+if [ -r etc/rc.d/rc.mysqld ]; then
+ if [ -x etc/rc.d/rc.mysqld ]; then
+ RC_MYSQLD=on
+ else
+ RC_MYSQLD=off
+ fi
+ cat << EOF >> $TMP/tmpscript
+ "rc.mysqld" "The MySQL database server" $RC_MYSQLD "MySQL, an SQL-based relational database daemon." \\
+EOF
+fi
+
+if [ -r etc/rc.d/rc.ntpd ]; then
+ if [ -x etc/rc.d/rc.ntpd ]; then
+ RC_NTPD=on
+ else
+ RC_NTPD=off
+ fi
+ cat << EOF >> $TMP/tmpscript
+ "rc.ntpd" "The network time server" $RC_NTPD "NTP synchronizes your time to/from other NTP servers." \\
+EOF
+fi
+
+if [ -r etc/rc.d/rc.pcmcia ]; then
+ if [ -x etc/rc.d/rc.pcmcia ]; then
+ RC_PCMCIA=on
+ else
+ RC_PCMCIA=off
+ fi
+ cat << EOF >> $TMP/tmpscript
+ "rc.pcmcia" "PCMCIA/Cardbus card services" $RC_PCMCIA "This supports PCMCIA or Cardbus cards used with laptops." \\
+EOF
+fi
+
+if [ -r etc/rc.d/rc.postfix ]; then
+ if [ -x etc/rc.d/rc.postfix ]; then
+ RC_POSTFIX=on
+ else
+ RC_POSTFIX=off
+ fi
+ cat << EOF >> $TMP/tmpscript
+ "rc.postfix" "The Postfix mail server" $RC_POSTFIX "The Postfix server allows your machine to send and receive mail." \\
+EOF
+fi
+
+if [ -r etc/rc.d/rc.rpc ]; then
+ if [ -x etc/rc.d/rc.rpc ]; then
+ RC_RPC=on
+ else
+ RC_RPC=off
+ fi
+ cat << EOF >> $TMP/tmpscript
+ "rc.rpc" "RPC (NFS) daemons" $RC_RPC "Needed to serve or mount NFS (Network File System) partitions." \\
+EOF
+fi
+
+if [ -r etc/rc.d/rc.samba ]; then
+ if [ -x etc/rc.d/rc.samba ]; then
+ RC_SAMBA=on
+ else
+ RC_SAMBA=off
+ fi
+ cat << EOF >> $TMP/tmpscript
+ "rc.samba" "The Samba file/print server" $RC_SAMBA "Samba is a file and print server for Windows networks." \\
+EOF
+fi
+
+if [ -r etc/rc.d/rc.saslauthd ]; then
+ if [ -x etc/rc.d/rc.saslauthd ]; then
+ RC_SASLAUTHD=on
+ else
+ RC_SASLAUTHD=off
+ fi
+ cat << EOF >> $TMP/tmpscript
+ "rc.saslauthd" "The SASL authentication server" $RC_SASLAUTHD "SASL is an authentication method often used by mail servers." \\
+EOF
+fi
+
+if [ -r etc/rc.d/rc.sendmail ]; then
+ if [ -x etc/rc.d/rc.sendmail ]; then
+ RC_SENDMAIL=on
+ else
+ RC_SENDMAIL=off
+ fi
+ cat << EOF >> $TMP/tmpscript
+ "rc.sendmail" "The Sendmail mail server" $RC_SENDMAIL "The Sendmail server allows your machine to send and receive mail." \\
+EOF
+fi
+
+if [ -r etc/rc.d/rc.smartd ]; then
+ if [ -x etc/rc.d/rc.smartd ]; then
+ RC_SMARTD=on
+ else
+ RC_SMARTD=off
+ fi
+ cat << EOF >> $TMP/tmpscript
+ "rc.smartd" "SMART monitoring daemon" $RC_SMARTD "The SMART daemon monitors your hard drives to help predict failures." \\
+EOF
+fi
+
+if [ -r etc/rc.d/rc.snmpd ]; then
+ if [ -x etc/rc.d/rc.snmpd ]; then
+ RC_SNMPD=on
+ else
+ RC_SNMPD=off
+ fi
+ cat << EOF >> $TMP/tmpscript
+ "rc.snmpd" "Net-SNMP daemon" $RC_SNMPD "SNMP daemon that receives and logs SNMP TRAP and INFORM messages." \\
+EOF
+fi
+
+if [ -r etc/rc.d/rc.syslog ]; then
+ if [ -x etc/rc.d/rc.syslog ]; then
+ RC_SYSLOGD=on
+ else
+ RC_SYSLOGD=off
+ fi
+ cat << EOF >> $TMP/tmpscript
+ "rc.syslog" "The Linux system logging utilities" $RC_SYSLOGD "The syslogd and klogd daemons log important messages under /var/log." \\
+EOF
+fi
+
+if [ -r etc/rc.d/rc.sshd ]; then
+ if [ -x etc/rc.d/rc.sshd ]; then
+ RC_SSHD=on
+ else
+ RC_SSHD=off
+ fi
+ cat << EOF >> $TMP/tmpscript
+ "rc.sshd" "The SSHD (secure shell) daemon" $RC_SSHD "SSHD allows secure encrypted logins to your machine." \\
+EOF
+fi
+
+cat << EOF >> $TMP/tmpscript
+ 2> $TMP/reply
+EOF
+
+. $TMP/tmpscript
+
+if [ ! $? = 0 ]; then
+ rm -f $TMP/reply $TMP/tmpscript
+ exit
+fi
+
+for service in rc.atalk rc.atd rc.bind rc.crond rc.cups rc.dovecot rc.dnsmasq rc.fuse rc.hald rc.hplip rc.httpd rc.inetd rc.ip_forward rc.lprng rc.messagebus rc.mysqld rc.ntpd rc.pcmcia rc.postfix rc.rpc rc.samba rc.saslauthd rc.smartd rc.snmpd rc.sendmail rc.syslog rc.sshd ; do
+ if [ -f etc/rc.d/$service ]; then
+ if grep -w $service $TMP/reply 1> /dev/null ; then
+ chmod 755 etc/rc.d/$service
+ else
+ chmod 644 etc/rc.d/$service
+ fi
+ fi
+done
+
+rm -f $TMP/reply $TMP/tmpscript
+