#!/bin/sh #BLURB="Select/deselect system daemons (services)" export TEXTDOMAIN=slint TMP=/var/log/setup/tmp if [ ! -d $TMP ]; then mkdir -p $TMP fi T_PX="$1" cd $T_PX rm -f $TMP/tmpscript echo -n 'dialog --visit-items --title "' > $TMP/tmpscript gettext "CONFIRM STARTUP SERVICES TO RUN" >> $TMP/tmpscript echo -n '" --item-help --checklist "' >> $TMP/tmpscript gettext "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." >> $TMP/tmpscript echo -n '" 25 80 10 ' >> $TMP/tmpscript if [ -r etc/rc.d/rc.atalk ]; then if [ -x etc/rc.d/rc.atalk ]; then RC_ATALK=on else RC_ATALK=off fi echo -n ' "rc.atalk" "' >> $TMP/tmpscript gettext "Netatalk Appletalk file/print server" >> $TMP/tmpscript echo -n '" ' >> $TMP/tmpscript echo -n $RC_ATALK >> $TMP/tmpscript echo -n ' "' >> $TMP/tmpscript gettext "The Netatalk server is a file and print server for Macintosh networks." >> $TMP/tmpscript echo '" \' >> $TMP/tmpscript 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 echo -n ' "rc.bind" "' >> $TMP/tmpscript gettext "BIND (Domain Name System) server" >> $TMP/tmpscript echo -n '" ' >> $TMP/tmpscript echo -n $RC_BIND >> $TMP/tmpscript echo -n ' "' >> $TMP/tmpscript gettext "BIND (Berkeley Internet Name Domain) is a Domain Name System (DNS) server." >> $TMP/tmpscript echo '" \' >> $TMP/tmpscript fi if [ -r etc/rc.d/rc.brltty ]; then if [ -x etc/rc.d/rc.brltty ]; then RC_BRLTTY=on else RC_BRLTTY=off fi echo -n ' "rc.brltty" "' >> $TMP/tmpscript gettext "Brltty (Braille display daemon)" >> $TMP/tmpscript echo -n '" ' >> $TMP/tmpscript echo -n $RC_BRLTTY >> $TMP/tmpscript echo -n ' "' >> $TMP/tmpscript gettext "brltty outputs console messages to Braille displays." >> $TMP/tmpscript echo '" \' >> $TMP/tmpscript 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 echo -n ' "rc.cups" "' >> $TMP/tmpscript gettext "CUPS print server" >> $TMP/tmpscript echo -n '" ' >> $TMP/tmpscript echo -n $RC_CUPS >> $TMP/tmpscript echo -n ' "' >> $TMP/tmpscript gettext "The Common UNIX Printing system (print spooler choice #1)." >> $TMP/tmpscript echo '" \' >> $TMP/tmpscript 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 echo -n ' "rc.dnsmasq" "' >> $TMP/tmpscript gettext "dnsmasq DHCP/DNS server" >> $TMP/tmpscript echo -n '" ' >> $TMP/tmpscript echo -n $RC_DNSMASQ >> $TMP/tmpscript echo -n ' "' >> $TMP/tmpscript gettext "dnsmasq provides DNS and DHCP service to a LAN." >> $TMP/tmpscript echo '" \' >> $TMP/tmpscript 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 echo -n ' "rc.fuse" "' >> $TMP/tmpscript gettext "Filesystem in Userspace library" >> $TMP/tmpscript echo -n '" ' >> $TMP/tmpscript echo -n $RC_FUSE >> $TMP/tmpscript echo -n ' "' >> $TMP/tmpscript gettext "FUSE is an interface to allow userspace programs to use filesystems." >> $TMP/tmpscript echo '" \' >> $TMP/tmpscript 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 echo -n ' "rc.hald" "' >> $TMP/tmpscript gettext "Hardware Abstraction Layer" >> $TMP/tmpscript echo -n '" ' >> $TMP/tmpscript echo -n $RC_HALD >> $TMP/tmpscript echo -n ' "' >> $TMP/tmpscript gettext "HAL makes access to CD/DVD drives and USB devices easier." >> $TMP/tmpscript echo '" \' >> $TMP/tmpscript 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 echo -n ' "rc.hplip" "' >> $TMP/tmpscript gettext "HP printer/scanner daemons" >> $TMP/tmpscript echo -n '" ' >> $TMP/tmpscript echo -n $RC_HPLIP >> $TMP/tmpscript echo -n ' "' >> $TMP/tmpscript gettext "Programs used to run printers and scanners from Hewlett Packard." >> $TMP/tmpscript echo '" \' >> $TMP/tmpscript 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 echo -n ' "rc.httpd" "' >> $TMP/tmpscript gettext "The Apache web server" >> $TMP/tmpscript echo -n '" ' >> $TMP/tmpscript echo -n $RC_HTTPD >> $TMP/tmpscript echo -n ' "' >> $TMP/tmpscript gettext "Apache, the most widely used web server on the net." >> $TMP/tmpscript echo '" \' >> $TMP/tmpscript 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 echo -n ' "rc.inetd" "' >> $TMP/tmpscript gettext "The BSD Inetd daemon" >> $TMP/tmpscript echo -n '" ' >> $TMP/tmpscript echo -n $RC_INETD >> $TMP/tmpscript echo -n ' "' >> $TMP/tmpscript gettext "Inetd daemon (this allows: time, ftp, comsat, talk, finger, and auth)." >> $TMP/tmpscript echo '" \' >> $TMP/tmpscript 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 echo -n ' "rc.ip_forward" "' >> $TMP/tmpscript gettext "Activate IP packet forwarding" >> $TMP/tmpscript echo -n '" ' >> $TMP/tmpscript echo -n $RC_IP_FORWARD >> $TMP/tmpscript echo -n ' "' >> $TMP/tmpscript gettext "Packet forwarding allows your Linux machine to act as a router." >> $TMP/tmpscript echo '" \' >> $TMP/tmpscript 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 echo -n ' "rc.lprng" "' >> $TMP/tmpscript gettext "LPRng print server" >> $TMP/tmpscript echo -n '" ' >> $TMP/tmpscript echo -n $RC_LPRNG >> $TMP/tmpscript echo -n ' "' >> $TMP/tmpscript gettext "The LPRng printing system (print spooler choice #2)." >> $TMP/tmpscript echo '" \' >> $TMP/tmpscript 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 echo -n ' "rc.messagebus" "' >> $TMP/tmpscript gettext "D-Bus system message bus" >> $TMP/tmpscript echo -n '" ' >> $TMP/tmpscript echo -n $RC_MESSAGEBUS >> $TMP/tmpscript echo -n ' "' >> $TMP/tmpscript gettext "Used for interprocess communication and coordination." >> $TMP/tmpscript echo '" \' >> $TMP/tmpscript 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 echo -n ' "rc.mysqld" "' >> $TMP/tmpscript gettext "The MySQL database server" >> $TMP/tmpscript echo -n '" ' >> $TMP/tmpscript echo -n $RC_MYSQLD >> $TMP/tmpscript echo -n ' "' >> $TMP/tmpscript gettext "MySQL, an SQL-based relational database daemon." >> $TMP/tmpscript echo '" \' >> $TMP/tmpscript 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 echo -n ' "rc.ntpd" "' >> $TMP/tmpscript gettext "The network time server" >> $TMP/tmpscript echo -n '" ' >> $TMP/tmpscript echo -n $RC_NTPD >> $TMP/tmpscript echo -n ' "' >> $TMP/tmpscript gettext "NTP synchronizes your time to/from other NTP servers." >> $TMP/tmpscript echo '" \' >> $TMP/tmpscript 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 echo -n ' "rc.pcmcia" "' >> $TMP/tmpscript gettext "PCMCIA/Cardbus card services" >> $TMP/tmpscript echo -n '" ' >> $TMP/tmpscript echo -n $RC_PCMCIA >> $TMP/tmpscript echo -n ' "' >> $TMP/tmpscript gettext "This supports PCMCIA or Cardbus cards used with laptops." >> $TMP/tmpscript echo '" \' >> $TMP/tmpscript 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 echo -n ' "rc.rpc" "' >> $TMP/tmpscript gettext "RPC (NFS) daemons" >> $TMP/tmpscript echo -n '" ' >> $TMP/tmpscript echo -n $RC_RPC >> $TMP/tmpscript echo -n ' "' >> $TMP/tmpscript gettext "Needed to serve or mount NFS (Network File System) partitions." >> $TMP/tmpscript echo '" \' >> $TMP/tmpscript 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 echo -n ' "rc.samba" "' >> $TMP/tmpscript gettext "The Samba file/print server" >> $TMP/tmpscript echo -n '" ' >> $TMP/tmpscript echo -n $RC_SAMBA >> $TMP/tmpscript echo -n ' "' >> $TMP/tmpscript gettext "Samba is a file and print server for Windows networks." >> $TMP/tmpscript echo '" \' >> $TMP/tmpscript 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 echo -n ' "rc.saslauthd" "' >> $TMP/tmpscript gettext "The SASL authentication server" >> $TMP/tmpscript echo -n '" ' >> $TMP/tmpscript echo -n $RC_SASLAUTHD >> $TMP/tmpscript echo -n ' "' >> $TMP/tmpscript gettext "SASL is an authentication method often used by mail servers." >> $TMP/tmpscript echo '" \' >> $TMP/tmpscript 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 echo -n ' "rc.sendmail" "' >> $TMP/tmpscript gettext "The Sendmail mail server" >> $TMP/tmpscript echo -n '" ' >> $TMP/tmpscript echo -n $RC_SENDMAIL >> $TMP/tmpscript echo -n ' "' >> $TMP/tmpscript gettext "The Sendmail server allows your machine to send and receive mail." >> $TMP/tmpscript echo '" \' >> $TMP/tmpscript 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 echo -n ' "rc.snmpd" "' >> $TMP/tmpscript gettext "Net-SNMP daemon" >> $TMP/tmpscript echo -n '" ' >> $TMP/tmpscript echo -n $RC_SNMPD >> $TMP/tmpscript echo -n ' "' >> $TMP/tmpscript gettext "SNMP daemon that receives and logs SNMP TRAP and INFORM messages." >> $TMP/tmpscript echo '" \' >> $TMP/tmpscript 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 echo -n ' "rc.syslog" "' >> $TMP/tmpscript gettext "The Linux system logging utilities" >> $TMP/tmpscript echo -n '" ' >> $TMP/tmpscript echo -n $RC_SYSLOGD >> $TMP/tmpscript echo -n ' "' >> $TMP/tmpscript gettext "The syslogd and klogd daemons log important messages under /var/log." >> $TMP/tmpscript echo '" \' >> $TMP/tmpscript 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 echo -n ' "rc.sshd" "' >> $TMP/tmpscript gettext "The SSHD (secure shell) daemon" >> $TMP/tmpscript echo -n '" ' >> $TMP/tmpscript echo -n $RC_SSHD >> $TMP/tmpscript echo -n ' "' >> $TMP/tmpscript gettext "SSHD allows secure encrypted logins to your machine." >> $TMP/tmpscript echo '" \' >> $TMP/tmpscript fi echo " 2> $TMP/reply" >> $TMP/tmpscript . $TMP/tmpscript if [ ! $? = 0 ]; then rm -f $TMP/reply $TMP/tmpscript exit fi for service in rc.atalk rc.bind rc.brltty rc.cups 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.rpc rc.samba rc.saslauthd 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