installer: Move the remaining installer related files out of /usr/local.
authorSascha Wildner <saw@online.de>
Sat, 26 Sep 2009 19:06:27 +0000 (21:06 +0200)
committerSascha Wildner <saw@online.de>
Sat, 26 Sep 2009 19:07:16 +0000 (21:07 +0200)
Reported-by: y0netan1
nrelease/gui/etc/master.passwd
nrelease/gui/etc/passwd
nrelease/installer/etc/master.passwd
nrelease/installer/usr/local/bin/installer [deleted file]
nrelease/installer/usr/local/etc/thttpd.conf [deleted file]
share/installer/Makefile
share/installer/sources.conf [moved from nrelease/installer/usr/local/share/dfuibe_installer/sources.conf with 100% similarity]
usr.sbin/installer/Makefile
usr.sbin/installer/dfuibe_installer/fn_install.c
usr.sbin/installer/installer/Makefile [new file with mode: 0644]
usr.sbin/installer/installer/installer.sh [moved from nrelease/gui/usr/local/bin/installer with 97% similarity, mode: 0644]

index 20a330f..d5afea1 100644 (file)
@@ -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
index 00fc8fa..4ff2024 100644 (file)
@@ -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
index 8d83adf..2ea65ab 100644 (file)
@@ -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 (executable)
index 96957fa..0000000
+++ /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 >/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 (file)
index 40f9dd3..0000000
+++ /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
index 552e8db..04c968f 100644 (file)
@@ -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
 
index a970a6e..2a3a9f5 100644 (file)
@@ -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 <bsd.subdir.mk>
index 3293bc7..77b2220 100644 (file)
@@ -40,7 +40,7 @@
 #include <libgen.h>
 #include <string.h>
 
-#define SOURCES_CONF_FILE "/usr/local/share/dfuibe_installer/sources.conf"
+#define SOURCES_CONF_FILE "/usr/share/installer/sources.conf"
 
 #ifdef ENABLE_NLS
 #include <libintl.h>
diff --git a/usr.sbin/installer/installer/Makefile b/usr.sbin/installer/installer/Makefile
new file mode 100644 (file)
index 0000000..a5a9a89
--- /dev/null
@@ -0,0 +1,4 @@
+SCRIPTS=installer.sh
+NOMAN=
+
+.include <bsd.prog.mk>
old mode 100755 (executable)
new mode 100644 (file)
similarity index 97%
rename from nrelease/gui/usr/local/bin/installer
rename to usr.sbin/installer/installer/installer.sh
index 3eb008e..3e1313f
@@ -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 ###