From 956939d57fd30b1082e36d59338da600d401c6d4 Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Sat, 26 Sep 2009 21:06:27 +0200 Subject: [PATCH] installer: Move the remaining installer related files out of /usr/local. Reported-by: y0netan1 --- nrelease/gui/etc/master.passwd | 2 +- nrelease/gui/etc/passwd | 2 +- nrelease/installer/etc/master.passwd | 2 +- nrelease/installer/usr/local/bin/installer | 153 ------------------ nrelease/installer/usr/local/etc/thttpd.conf | 7 - share/installer/Makefile | 2 +- .../installer}/sources.conf | 0 usr.sbin/installer/Makefile | 4 +- .../installer/dfuibe_installer/fn_install.c | 2 +- usr.sbin/installer/installer/Makefile | 4 + .../installer/installer/installer.sh | 1 - 11 files changed, 10 insertions(+), 169 deletions(-) delete mode 100755 nrelease/installer/usr/local/bin/installer delete mode 100644 nrelease/installer/usr/local/etc/thttpd.conf rename {nrelease/installer/usr/local/share/dfuibe_installer => share/installer}/sources.conf (100%) create mode 100644 usr.sbin/installer/installer/Makefile rename nrelease/gui/usr/local/bin/installer => usr.sbin/installer/installer/installer.sh (97%) mode change 100755 => 100644 diff --git a/nrelease/gui/etc/master.passwd b/nrelease/gui/etc/master.passwd index 20a330ff6f..d5afea1619 100644 --- a/nrelease/gui/etc/master.passwd +++ b/nrelease/gui/etc/master.passwd @@ -2,7 +2,7 @@ # root::0:0::0:0:Charlie &:/root:/bin/csh toor:*:0:0::0:0:Bourne-again Superuser:/root: -installer::0:0::0:0:Bourne-again Superuser:/root:/usr/local/bin/installer +installer::0:0::0:0:Bourne-again Superuser:/root:/usr/sbin/installer daemon:*:1:1::0:0:Owner of many system processes:/root:/sbin/nologin operator:*:2:5::0:0:System &:/:/sbin/nologin bin:*:3:7::0:0:Binaries Commands and Source:/:/sbin/nologin diff --git a/nrelease/gui/etc/passwd b/nrelease/gui/etc/passwd index 00fc8fa4d4..4ff2024e39 100644 --- a/nrelease/gui/etc/passwd +++ b/nrelease/gui/etc/passwd @@ -2,7 +2,7 @@ # root:*:0:0:Charlie &:/root:/usr/pkg/bin/zsh toor:*:0:0:Bourne-again Superuser:/root: -installer:*:0:0:Bourne-again Superuser:/root:/usr/local/bin/installer +installer:*:0:0:Bourne-again Superuser:/root:/usr/sbin/installer daemon:*:1:1:Owner of many system processes:/root:/sbin/nologin operator:*:2:5:System &:/:/sbin/nologin bin:*:3:7:Binaries Commands and Source:/:/sbin/nologin diff --git a/nrelease/installer/etc/master.passwd b/nrelease/installer/etc/master.passwd index 8d83adff7b..2ea65abdb3 100644 --- a/nrelease/installer/etc/master.passwd +++ b/nrelease/installer/etc/master.passwd @@ -2,7 +2,7 @@ # root::0:0::0:0:Charlie &:/root:/bin/csh toor:*:0:0::0:0:Bourne-again Superuser:/root: -installer::0:0::0:0:Bourne-again Superuser:/root:/usr/local/bin/installer +installer::0:0::0:0:Bourne-again Superuser:/root:/usr/sbin/installer daemon:*:1:1::0:0:Owner of many system processes:/root:/sbin/nologin operator:*:2:5::0:0:System &:/:/sbin/nologin bin:*:3:7::0:0:Binaries Commands and Source:/:/sbin/nologin diff --git a/nrelease/installer/usr/local/bin/installer b/nrelease/installer/usr/local/bin/installer deleted file mode 100755 index 96957fa00d..0000000000 --- a/nrelease/installer/usr/local/bin/installer +++ /dev/null @@ -1,153 +0,0 @@ -#!/bin/sh - -# installer - start installer frontend and backend as per pfi config. -# $Id: installer,v 1.20 2005/04/13 03:32:16 cpressey Exp $ -# $DragonFly: src/nrelease/installer/usr/local/bin/installer,v 1.12 2008/10/23 16:45:37 swildner Exp $ - -### SUBS ### - -background_backend() -{ - RENDEZVOUS=$1 - TRANSPORT=$2 - $pfi_backend -r $RENDEZVOUS -t $TRANSPORT >/dev/null 2>&1 - RESULT=$? - case "$RESULT" in - 0) - ;; - 5) - $pfi_shutdown_command - ;; - *) - ;; - esac -} - -installer_start() -{ - # Console start sequence: - # - Backend (and all other logging) goes to console (ttyv0) - # - curses frontend starts on ttyv1. - # - Uses vidcontrol -s 2 to switch to ttyv1 once the frontend is up. - - echo -n "Starting installer. " - - if [ -r /etc/defaults/pfi.conf ]; then - . /etc/defaults/pfi.conf - fi - - if [ -r /etc/pfi.conf ]; then - echo "Reading /etc/pfi.conf ..." - . /etc/pfi.conf - else - echo "/etc/pfi.conf not found, starting interactive install." - fi - - # We can set up any install variables and such - # here by examining pfi_* variables. - - if [ "X$pfi_run" != "X" ]; then - pfi_frontend=none - $pfi_run - fi - - case "X$pfi_dfui_transport" in - Xcaps) - sysctl kern.caps_enabled=1 - RENDEZVOUS="installer" - ;; - Xnpipe) - RENDEZVOUS="installer" - ;; - Xtcp) - RENDEZVOUS="9999" - ;; - *) - echo "Unsupported DFUI transport '$pfi_dfui_transport'." - return - ;; - esac - - if [ "X$SERIAL" = "XYES" ]; then - background_backend $RENDEZVOUS $pfi_dfui_transport & - sleep 1 - ESCDELAY=$pfi_curses_escdelay \ - /usr/sbin/dfuife_curses \ - -r $RENDEZVOUS \ - -t $pfi_dfui_transport \ - -b /usr/share/installer/fred.txt \ - 2>/dev/null - pfi_frontend=none - fi - - case "X$pfi_frontend" in - Xqt) - $pfi_backend -r $RENDEZVOUS -t $pfi_dfui_transport - RESULT=$? - ;; - Xcgi) - $pfi_backend -r $RENDEZVOUS -t $pfi_dfui_transport - RESULT=$? - ;; - Xcurses) - ps auwwwxxx > /tmp/ps.txt - if grep -q dfuife_curses /tmp/ps.txt; then - # Frontend is already running. - else - ESCDELAY=$pfi_curses_escdelay \ - /usr/sbin/dfuife_curses \ - -r $RENDEZVOUS \ - -t $pfi_dfui_transport \ - -b /usr/share/installer/fred.txt \ - 2>/dev/ttyv0 /dev/ttyv1 & - fi - rm -f /tmp/ps.txt - sleep 1 - vidcontrol -s 2 - $pfi_backend -r $RENDEZVOUS -t $pfi_dfui_transport - RESULT=$? - sleep 1 - killall dfuife_curses - vidcontrol -s 1 - ;; - Xnone) - RESULT=0 - ;; - *) - echo "Unknown installer frontend '$pfi_frontend'." - return - ;; - esac - - case "$RESULT" in - 0) - ;; - 5) - $pfi_shutdown_command - ;; - *) - ;; - esac -} - -### MAIN ### - -if [ "X$1" = "Xserial" ]; then - SERIAL=YES -fi - -TTY=`w | awk '{ print $2 }' | tail -n1` -if [ "tty$TTY" = "ttyd0" ]; then - SERIAL=YES -fi - -ps auwwwxxx > /tmp/ps.txt -if grep -q dfuibe_installer /tmp/ps.txt; then - # Installer is already running. Log in normally. - rm -f /tmp/ps.txt -else - rm -f /tmp/ps.txt - installer_start -fi - -### END of installer ### diff --git a/nrelease/installer/usr/local/etc/thttpd.conf b/nrelease/installer/usr/local/etc/thttpd.conf deleted file mode 100644 index 40f9dd3408..0000000000 --- a/nrelease/installer/usr/local/etc/thttpd.conf +++ /dev/null @@ -1,7 +0,0 @@ -# $DragonFly: src/nrelease/installer/usr/local/etc/thttpd.conf,v 1.1 2004/07/10 22:26:20 dillon Exp $ -# -dir=/usr/local/www -user=root -cgipat=*.cgi -logfile=/var/log/thttpd.log -pidfile=/var/run/thttpd.pid diff --git a/share/installer/Makefile b/share/installer/Makefile index 552e8db66a..04c968f2b3 100644 --- a/share/installer/Makefile +++ b/share/installer/Makefile @@ -1,6 +1,6 @@ # $DragonFly: src/share/installer/Makefile,v 1.2 2008/07/09 07:21:03 swildner Exp $ -FILES= cmdnames.conf fred.txt +FILES= cmdnames.conf fred.txt sources.conf NOOBJ= FILESDIR= ${BINDIR}/installer diff --git a/nrelease/installer/usr/local/share/dfuibe_installer/sources.conf b/share/installer/sources.conf similarity index 100% rename from nrelease/installer/usr/local/share/dfuibe_installer/sources.conf rename to share/installer/sources.conf diff --git a/usr.sbin/installer/Makefile b/usr.sbin/installer/Makefile index a970a6e5e9..2a3a9f5d0c 100644 --- a/usr.sbin/installer/Makefile +++ b/usr.sbin/installer/Makefile @@ -1,5 +1,3 @@ -# $DragonFly: src/usr.sbin/installer/Makefile,v 1.3 2008/07/09 07:21:03 swildner Exp $ - -SUBDIR= libaura libdfui libinstaller dfuife_curses dfuibe_installer +SUBDIR= libaura libdfui libinstaller dfuife_curses dfuibe_installer installer .include diff --git a/usr.sbin/installer/dfuibe_installer/fn_install.c b/usr.sbin/installer/dfuibe_installer/fn_install.c index 3293bc7a85..77b2220688 100644 --- a/usr.sbin/installer/dfuibe_installer/fn_install.c +++ b/usr.sbin/installer/dfuibe_installer/fn_install.c @@ -40,7 +40,7 @@ #include #include -#define SOURCES_CONF_FILE "/usr/local/share/dfuibe_installer/sources.conf" +#define SOURCES_CONF_FILE "/usr/share/installer/sources.conf" #ifdef ENABLE_NLS #include diff --git a/usr.sbin/installer/installer/Makefile b/usr.sbin/installer/installer/Makefile new file mode 100644 index 0000000000..a5a9a89fca --- /dev/null +++ b/usr.sbin/installer/installer/Makefile @@ -0,0 +1,4 @@ +SCRIPTS=installer.sh +NOMAN= + +.include diff --git a/nrelease/gui/usr/local/bin/installer b/usr.sbin/installer/installer/installer.sh old mode 100755 new mode 100644 similarity index 97% rename from nrelease/gui/usr/local/bin/installer rename to usr.sbin/installer/installer/installer.sh index 3eb008efd5..3e1313fe0d --- a/nrelease/gui/usr/local/bin/installer +++ b/usr.sbin/installer/installer/installer.sh @@ -2,7 +2,6 @@ # installer - start installer frontend and backend as per pfi config. # $Id: installer,v 1.20 2005/04/13 03:32:16 cpressey Exp $ -# $DragonFly: src/nrelease/gui/usr/local/bin/installer,v 1.2 2008/10/23 16:45:36 swildner Exp $ ### SUBS ### -- 2.41.0