diff options
Diffstat (limited to 'source')
238 files changed, 10288 insertions, 473 deletions
diff --git a/source/a/bash/bash-4.4-patches/bash44-020 b/source/a/bash/bash-4.4-patches/bash44-020 new file mode 100644 index 000000000..1c42643b6 --- /dev/null +++ b/source/a/bash/bash-4.4-patches/bash44-020 @@ -0,0 +1,177 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.4 +Patch-ID: bash44-020 + +Bug-Reported-by: Graham Northup <northug@clarkson.edu> +Bug-Reference-ID: <537530c3-61f0-349b-9de6-fa4e2487f428@clarkson.edu> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2017-02/msg00025.html + +Bug-Description: + +In circumstances involving long-running scripts that create and reap many +processes, it is possible for the hash table bash uses to store exit +statuses from asynchronous processes to develop loops. This patch fixes +the loop causes and adds code to detect any future loops. + +Patch (apply with `patch -p0'): + +*** ../bash-4.4-patched/jobs.c 2016-11-11 13:42:55.000000000 -0500 +--- jobs.c 2017-02-22 15:16:28.000000000 -0500 +*************** +*** 813,818 **** + struct pidstat *ps; + +! bucket = pshash_getbucket (pid); +! psi = bgp_getindex (); + ps = &bgpids.storage[psi]; + +--- 796,815 ---- + struct pidstat *ps; + +! /* bucket == existing chain of pids hashing to same value +! psi = where were going to put this pid/status */ +! +! bucket = pshash_getbucket (pid); /* index into pidstat_table */ +! psi = bgp_getindex (); /* bgpids.head, index into storage */ +! +! /* XXX - what if psi == *bucket? */ +! if (psi == *bucket) +! { +! #ifdef DEBUG +! internal_warning ("hashed pid %d (pid %d) collides with bgpids.head, skipping", psi, pid); +! #endif +! bgpids.storage[psi].pid = NO_PID; /* make sure */ +! psi = bgp_getindex (); /* skip to next one */ +! } +! + ps = &bgpids.storage[psi]; + +*************** +*** 842,845 **** +--- 839,843 ---- + { + struct pidstat *ps; ++ ps_index_t *bucket; + + ps = &bgpids.storage[psi]; +*************** +*** 847,856 **** + return; + +! if (ps->bucket_next != NO_PID) + bgpids.storage[ps->bucket_next].bucket_prev = ps->bucket_prev; +! if (ps->bucket_prev != NO_PID) + bgpids.storage[ps->bucket_prev].bucket_next = ps->bucket_next; + else +! *(pshash_getbucket (ps->pid)) = ps->bucket_next; + } + +--- 845,861 ---- + return; + +! if (ps->bucket_next != NO_PIDSTAT) + bgpids.storage[ps->bucket_next].bucket_prev = ps->bucket_prev; +! if (ps->bucket_prev != NO_PIDSTAT) + bgpids.storage[ps->bucket_prev].bucket_next = ps->bucket_next; + else +! { +! bucket = pshash_getbucket (ps->pid); +! *bucket = ps->bucket_next; /* deleting chain head in hash table */ +! } +! +! /* clear out this cell, just in case */ +! ps->pid = NO_PID; +! ps->bucket_next = ps->bucket_prev = NO_PIDSTAT; + } + +*************** +*** 859,863 **** + pid_t pid; + { +! ps_index_t psi; + + if (bgpids.storage == 0 || bgpids.nalloc == 0 || bgpids.npid == 0) +--- 864,868 ---- + pid_t pid; + { +! ps_index_t psi, orig_psi; + + if (bgpids.storage == 0 || bgpids.nalloc == 0 || bgpids.npid == 0) +*************** +*** 865,871 **** + + /* Search chain using hash to find bucket in pidstat_table */ +! for (psi = *(pshash_getbucket (pid)); psi != NO_PIDSTAT; psi = bgpids.storage[psi].bucket_next) +! if (bgpids.storage[psi].pid == pid) +! break; + + if (psi == NO_PIDSTAT) +--- 870,883 ---- + + /* Search chain using hash to find bucket in pidstat_table */ +! for (orig_psi = psi = *(pshash_getbucket (pid)); psi != NO_PIDSTAT; psi = bgpids.storage[psi].bucket_next) +! { +! if (bgpids.storage[psi].pid == pid) +! break; +! if (orig_psi == bgpids.storage[psi].bucket_next) /* catch reported bug */ +! { +! internal_warning ("bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next", psi); +! return 0; +! } +! } + + if (psi == NO_PIDSTAT) +*************** +*** 905,909 **** + pid_t pid; + { +! ps_index_t psi; + + if (bgpids.storage == 0 || bgpids.nalloc == 0 || bgpids.npid == 0) +--- 917,921 ---- + pid_t pid; + { +! ps_index_t psi, orig_psi; + + if (bgpids.storage == 0 || bgpids.nalloc == 0 || bgpids.npid == 0) +*************** +*** 911,917 **** + + /* Search chain using hash to find bucket in pidstat_table */ +! for (psi = *(pshash_getbucket (pid)); psi != NO_PIDSTAT; psi = bgpids.storage[psi].bucket_next) +! if (bgpids.storage[psi].pid == pid) +! return (bgpids.storage[psi].status); + + return -1; +--- 923,936 ---- + + /* Search chain using hash to find bucket in pidstat_table */ +! for (orig_psi = psi = *(pshash_getbucket (pid)); psi != NO_PIDSTAT; psi = bgpids.storage[psi].bucket_next) +! { +! if (bgpids.storage[psi].pid == pid) +! return (bgpids.storage[psi].status); +! if (orig_psi == bgpids.storage[psi].bucket_next) /* catch reported bug */ +! { +! internal_warning ("bgp_search: LOOP: psi (%d) == storage[psi].bucket_next", psi); +! return -1; +! } +! } + + return -1; +*** ../bash-4.4/patchlevel.h 2016-06-22 14:51:03.000000000 -0400 +--- patchlevel.h 2016-10-01 11:01:28.000000000 -0400 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 19 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 20 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/source/a/bash/bash-4.4-patches/bash44-021 b/source/a/bash/bash-4.4-patches/bash44-021 new file mode 100644 index 000000000..37da331d5 --- /dev/null +++ b/source/a/bash/bash-4.4-patches/bash44-021 @@ -0,0 +1,57 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.4 +Patch-ID: bash44-021 + +Bug-Reported-by: werner@suse.de +Bug-Reference-ID: <201803281402.w2SE2VOa000476@noether.suse.de> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2018-03/msg00196.html + +Bug-Description: + +A SIGINT received inside a SIGINT trap handler can possibly cause the +shell to loop. + +Patch (apply with `patch -p0'): + +*** ../bash-20180329/jobs.c 2018-02-11 18:07:22.000000000 -0500 +--- jobs.c 2018-04-02 14:24:21.000000000 -0400 +*************** +*** 2690,2694 **** + if (job_control == 0 || (subshell_environment&SUBSHELL_COMSUB)) + { +! old_sigint_handler = set_signal_handler (SIGINT, wait_sigint_handler); + waiting_for_child = 0; + if (old_sigint_handler == SIG_IGN) +--- 2690,2704 ---- + if (job_control == 0 || (subshell_environment&SUBSHELL_COMSUB)) + { +! SigHandler *temp_sigint_handler; +! +! temp_sigint_handler = set_signal_handler (SIGINT, wait_sigint_handler); +! if (temp_sigint_handler == wait_sigint_handler) +! { +! #if defined (DEBUG) +! internal_warning ("wait_for: recursively setting old_sigint_handler to wait_sigint_handler: running_trap = %d", running_trap); +! #endif +! } +! else +! old_sigint_handler = temp_sigint_handler; + waiting_for_child = 0; + if (old_sigint_handler == SIG_IGN) +*** ../bash-4.4/patchlevel.h 2016-06-22 14:51:03.000000000 -0400 +--- patchlevel.h 2016-10-01 11:01:28.000000000 -0400 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 20 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 21 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/source/a/bash/bash-4.4-patches/bash44-022 b/source/a/bash/bash-4.4-patches/bash44-022 new file mode 100644 index 000000000..f692a2c46 --- /dev/null +++ b/source/a/bash/bash-4.4-patches/bash44-022 @@ -0,0 +1,61 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.4 +Patch-ID: bash44-022 + +Bug-Reported-by: Nuzhna Pomoshch <nuzhna_pomoshch@yahoo.com> +Bug-Reference-ID: <1317167476.1492079.1495999776464@mail.yahoo.com> +Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-readline/2017-05/msg00005.html + +Bug-Description: + +There are cases where a failing readline command (e.g., delete-char at the end +of a line) can cause a multi-character key sequence to `back up' and attempt +to re-read some of the characters in the sequence. + +Patch (apply with `patch -p0'): + +*** ../bash-4.4-patched/lib/readline/readline.c 2016-04-20 15:53:52.000000000 -0400 +--- lib/readline/readline.c 2018-05-26 17:19:00.000000000 -0400 +*************** +*** 1058,1062 **** + r = _rl_dispatch (ANYOTHERKEY, m); + } +! else if (r && map[ANYOTHERKEY].function) + { + /* We didn't match (r is probably -1), so return something to +--- 1056,1060 ---- + r = _rl_dispatch (ANYOTHERKEY, m); + } +! else if (r < 0 && map[ANYOTHERKEY].function) + { + /* We didn't match (r is probably -1), so return something to +*************** +*** 1070,1074 **** + return -2; + } +! else if (r && got_subseq) + { + /* OK, back up the chain. */ +--- 1068,1072 ---- + return -2; + } +! else if (r < 0 && got_subseq) /* XXX */ + { + /* OK, back up the chain. */ +*** ../bash-4.4/patchlevel.h 2016-06-22 14:51:03.000000000 -0400 +--- patchlevel.h 2016-10-01 11:01:28.000000000 -0400 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 21 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 22 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/source/a/bash/bash-4.4-patches/bash44-023 b/source/a/bash/bash-4.4-patches/bash44-023 new file mode 100644 index 000000000..dd8d75d9b --- /dev/null +++ b/source/a/bash/bash-4.4-patches/bash44-023 @@ -0,0 +1,52 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.4 +Patch-ID: bash44-023 + +Bug-Reported-by: Martijn Dekker <martijn@inlv.org> +Bug-Reference-ID: <5326d6b9-2625-1d32-3e6e-ad1d15462c09@inlv.org> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2016-11/msg00041.html + +Bug-Description: + +When sourcing a file from an interactive shell, setting the SIGINT handler +to the default and typing ^C will cause the shell to exit. + +Patch (apply with `patch -p0'): + +*** ../bash-4.4-patched/builtins/trap.def 2016-01-25 13:32:38.000000000 -0500 +--- builtins/trap.def 2016-11-06 12:04:35.000000000 -0500 +*************** +*** 99,102 **** +--- 99,103 ---- + + extern int posixly_correct, subshell_environment; ++ extern int sourcelevel, running_trap; + + int +*************** +*** 213,216 **** +--- 214,220 ---- + if (interactive) + set_signal_handler (SIGINT, sigint_sighandler); ++ /* special cases for interactive == 0 */ ++ else if (interactive_shell && (sourcelevel||running_trap)) ++ set_signal_handler (SIGINT, sigint_sighandler); + else + set_signal_handler (SIGINT, termsig_sighandler); +*** ../bash-4.4/patchlevel.h 2016-06-22 14:51:03.000000000 -0400 +--- patchlevel.h 2016-10-01 11:01:28.000000000 -0400 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 22 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 23 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/source/a/bash/bash.SlackBuild b/source/a/bash/bash.SlackBuild index 23cd2e6af..3cf0e6cc5 100755 --- a/source/a/bash/bash.SlackBuild +++ b/source/a/bash/bash.SlackBuild @@ -31,7 +31,7 @@ PKG=$TMP/package-bash PKGNAM=bash VERSION=${VERSION:-$(echo bash-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} -BUILD=${BUILD:-3} +BUILD=${BUILD:-1} # Automatically determine the architecture we're building on: MARCH=$( uname -m ) diff --git a/source/ap/cups/3cd7b5e053f8100da1ca8d8daf93976cca3516ef.patch b/source/ap/cups/3cd7b5e053f8100da1ca8d8daf93976cca3516ef.patch deleted file mode 100644 index 84ac77ed1..000000000 --- a/source/ap/cups/3cd7b5e053f8100da1ca8d8daf93976cca3516ef.patch +++ /dev/null @@ -1,159 +0,0 @@ ---- ./scheduler/auth.c.orig 2018-03-22 22:48:36.000000000 -0500 -+++ ./scheduler/auth.c 2018-03-28 23:26:32.100862569 -0500 -@@ -71,9 +71,6 @@ - static int compare_locations(cupsd_location_t *a, - cupsd_location_t *b); - static cupsd_authmask_t *copy_authmask(cupsd_authmask_t *am, void *data); --#if !HAVE_LIBPAM --static char *cups_crypt(const char *pw, const char *salt); --#endif /* !HAVE_LIBPAM */ - static void free_authmask(cupsd_authmask_t *am, void *data); - #if HAVE_LIBPAM - static int pam_func(int, const struct pam_message **, -@@ -694,14 +691,14 @@ - * client... - */ - -- pass = cups_crypt(password, pw->pw_passwd); -+ pass = crypt(password, pw->pw_passwd); - - if (!pass || strcmp(pw->pw_passwd, pass)) - { - # ifdef HAVE_SHADOW_H - if (spw) - { -- pass = cups_crypt(password, spw->sp_pwdp); -+ pass = crypt(password, spw->sp_pwdp); - - if (pass == NULL || strcmp(spw->sp_pwdp, pass)) - { -@@ -1995,129 +1992,6 @@ - } - - --#if !HAVE_LIBPAM --/* -- * 'cups_crypt()' - Encrypt the password using the DES or MD5 algorithms, -- * as needed. -- */ -- --static char * /* O - Encrypted password */ --cups_crypt(const char *pw, /* I - Password string */ -- const char *salt) /* I - Salt (key) string */ --{ -- if (!strncmp(salt, "$1$", 3)) -- { -- /* -- * Use MD5 passwords without the benefit of PAM; this is for -- * Slackware Linux, and the algorithm was taken from the -- * old shadow-19990827/lib/md5crypt.c source code... :( -- */ -- -- int i; /* Looping var */ -- unsigned long n; /* Output number */ -- int pwlen; /* Length of password string */ -- const char *salt_end; /* End of "salt" data for MD5 */ -- char *ptr; /* Pointer into result string */ -- _cups_md5_state_t state; /* Primary MD5 state info */ -- _cups_md5_state_t state2; /* Secondary MD5 state info */ -- unsigned char digest[16]; /* MD5 digest result */ -- static char result[120]; /* Final password string */ -- -- -- /* -- * Get the salt data between dollar signs, e.g. $1$saltdata$md5. -- * Get a maximum of 8 characters of salt data after $1$... -- */ -- -- for (salt_end = salt + 3; *salt_end && (salt_end - salt) < 11; salt_end ++) -- if (*salt_end == '$') -- break; -- -- /* -- * Compute the MD5 sum we need... -- */ -- -- pwlen = strlen(pw); -- -- _cupsMD5Init(&state); -- _cupsMD5Append(&state, (unsigned char *)pw, pwlen); -- _cupsMD5Append(&state, (unsigned char *)salt, salt_end - salt); -- -- _cupsMD5Init(&state2); -- _cupsMD5Append(&state2, (unsigned char *)pw, pwlen); -- _cupsMD5Append(&state2, (unsigned char *)salt + 3, salt_end - salt - 3); -- _cupsMD5Append(&state2, (unsigned char *)pw, pwlen); -- _cupsMD5Finish(&state2, digest); -- -- for (i = pwlen; i > 0; i -= 16) -- _cupsMD5Append(&state, digest, i > 16 ? 16 : i); -- -- for (i = pwlen; i > 0; i >>= 1) -- _cupsMD5Append(&state, (unsigned char *)((i & 1) ? "" : pw), 1); -- -- _cupsMD5Finish(&state, digest); -- -- for (i = 0; i < 1000; i ++) -- { -- _cupsMD5Init(&state); -- -- if (i & 1) -- _cupsMD5Append(&state, (unsigned char *)pw, pwlen); -- else -- _cupsMD5Append(&state, digest, 16); -- -- if (i % 3) -- _cupsMD5Append(&state, (unsigned char *)salt + 3, salt_end - salt - 3); -- -- if (i % 7) -- _cupsMD5Append(&state, (unsigned char *)pw, pwlen); -- -- if (i & 1) -- _cupsMD5Append(&state, digest, 16); -- else -- _cupsMD5Append(&state, (unsigned char *)pw, pwlen); -- -- _cupsMD5Finish(&state, digest); -- } -- -- /* -- * Copy the final sum to the result string and return... -- */ -- -- memcpy(result, salt, (size_t)(salt_end - salt)); -- ptr = result + (salt_end - salt); -- *ptr++ = '$'; -- -- for (i = 0; i < 5; i ++, ptr += 4) -- { -- n = ((((unsigned)digest[i] << 8) | (unsigned)digest[i + 6]) << 8); -- -- if (i < 4) -- n |= (unsigned)digest[i + 12]; -- else -- n |= (unsigned)digest[5]; -- -- to64(ptr, n, 4); -- } -- -- to64(ptr, (unsigned)digest[11], 2); -- ptr += 2; -- *ptr = '\0'; -- -- return (result); -- } -- else -- { -- /* -- * Use the standard crypt() function... -- */ -- -- return (crypt(pw, salt)); -- } --} --#endif /* !HAVE_LIBPAM */ -- -- - /* - * 'free_authmask()' - Free function for auth masks. - */ diff --git a/source/ap/cups/cups.SlackBuild b/source/ap/cups/cups.SlackBuild index 0cb5680ed..fe8fd16c3 100755 --- a/source/ap/cups/cups.SlackBuild +++ b/source/ap/cups/cups.SlackBuild @@ -26,7 +26,7 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=cups VERSION=${VERSION:-$(echo $PKGNAM-*-source.tar.?z | cut -f 2 -d -)} -BUILD=${BUILD:-2} +BUILD=${BUILD:-1} # Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then @@ -79,9 +79,6 @@ rm -rf cups-$VERSION tar xvf $CWD/cups-$VERSION-source.tar.?z || exit 1 cd cups-$VERSION || exit 1 -# Fix building without PAM: -zcat $CWD/3cd7b5e053f8100da1ca8d8daf93976cca3516ef.patch.gz | patch -p1 --verbose || exit 1 - sed -i.orig -e 's#$exec_prefix/lib/cups#$libdir/cups#g' configure CFLAGS="$SLKCFLAGS" \ diff --git a/source/ap/cups/cups.url b/source/ap/cups/cups.url index 73e1dab3f..1b693d7e0 100644 --- a/source/ap/cups/cups.url +++ b/source/ap/cups/cups.url @@ -1 +1 @@ -https://github.com/apple/cups/releases/download/v2.2.7/cups-2.2.7-source.tar.gz +https://github.com/apple/cups/releases/download/v2.2.8/cups-2.2.8-source.tar.gz diff --git a/source/ap/ghostscript-fonts-std/doinst.sh b/source/ap/ghostscript-fonts-std/doinst.sh index 3d8d40100..b48dde353 100644 --- a/source/ap/ghostscript-fonts-std/doinst.sh +++ b/source/ap/ghostscript-fonts-std/doinst.sh @@ -1,11 +1,9 @@ #!/bin/sh # Update the X font indexes: -if [ -x /usr/bin/fc-cache ]; then - /usr/bin/fc-cache -f -fi if [ -x /usr/bin/mkfontdir -o -x /usr/X11R6/bin/mkfontdir ]; then - ( cd /usr/share/fonts/Type1 - mkfontdir . - mkfontscale . - ) + mkfontdir usr/share/fonts/Type1 2> /dev/null + mkfontscale usr/share/fonts/Type1 2> /dev/null +fi +if [ -x /usr/bin/fc-cache ]; then + /usr/bin/fc-cache -f 2> /dev/null fi diff --git a/source/ap/ghostscript-fonts-std/ghostscript-fonts-std.SlackBuild b/source/ap/ghostscript-fonts-std/ghostscript-fonts-std.SlackBuild index 5b64f4952..27c83a353 100755 --- a/source/ap/ghostscript-fonts-std/ghostscript-fonts-std.SlackBuild +++ b/source/ap/ghostscript-fonts-std/ghostscript-fonts-std.SlackBuild @@ -24,7 +24,7 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=ghostscript-fonts-std VERSION=${VERSION:-8.11} ARCH=${ARCH:-noarch} -BUILD=${BUILD:-2} +BUILD=${BUILD:-3} # If the variable PRINT_PACKAGE_NAME is set, then this script will report what # the name of the created package would be, and then exit. This information diff --git a/source/ap/sqlite/sqlite.SlackBuild b/source/ap/sqlite/sqlite.SlackBuild index 6e877cfda..e9c7530b4 100755 --- a/source/ap/sqlite/sqlite.SlackBuild +++ b/source/ap/sqlite/sqlite.SlackBuild @@ -26,7 +26,7 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=sqlite -BUILD=${BUILD:-2} +BUILD=${BUILD:-1} # First, convert the .zip file if needed: if ls *.zip 1> /dev/null 2> /dev/null ; then diff --git a/source/ap/terminus-font/doinst.sh b/source/ap/terminus-font/doinst.sh index 18d125130..ece74d76f 100644 --- a/source/ap/terminus-font/doinst.sh +++ b/source/ap/terminus-font/doinst.sh @@ -1,10 +1,8 @@ #!/bin/sh # Update the X font indexes: if [ -x /usr/bin/mkfontdir -o -x /usr/X11R6/bin/mkfontdir ]; then - ( cd /usr/share/fonts/misc - mkfontdir . - ) + mkfontdir usr/share/fonts/misc 2> /dev/null fi if [ -x /usr/bin/fc-cache ]; then - /usr/bin/fc-cache -f + /usr/bin/fc-cache -f 2> /dev/null fi diff --git a/source/ap/terminus-font/terminus-font.SlackBuild b/source/ap/terminus-font/terminus-font.SlackBuild index 19ce9d8d9..3536b796b 100755 --- a/source/ap/terminus-font/terminus-font.SlackBuild +++ b/source/ap/terminus-font/terminus-font.SlackBuild @@ -24,7 +24,7 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=terminus-font VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} -BUILD=${BUILD:-2} +BUILD=${BUILD:-3} # Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then diff --git a/source/d/rust/rust.SlackBuild b/source/d/rust/rust.SlackBuild index 68cf3cf77..b6d13762f 100755 --- a/source/d/rust/rust.SlackBuild +++ b/source/d/rust/rust.SlackBuild @@ -26,7 +26,7 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=rust SRCNAM="${PKGNAM}c" -VERSION=${VERSION:-1.26.1} +VERSION=${VERSION:-1.26.2} BUILD=${BUILD:-1} # Set this to YES to build with the system LLVM, or NO to use the bundled LLVM. diff --git a/source/d/rust/rust.url b/source/d/rust/rust.url index be83fa515..13bbdc6be 100644 --- a/source/d/rust/rust.url +++ b/source/d/rust/rust.url @@ -1,5 +1,5 @@ # Source code (repacked to .tar.xz): -lftpget https://static.rust-lang.org/dist/rustc-1.26.1-src.tar.gz +lftpget https://static.rust-lang.org/dist/rustc-1.26.2-src.tar.gz gzip -d rustc-*tar.gz plzip -n 6 -9 -v rustc-*tar diff --git a/source/installer/ChangeLog.txt b/source/installer/ChangeLog.txt index f20ea82c8..3604c7da0 100644 --- a/source/installer/ChangeLog.txt +++ b/source/installer/ChangeLog.txt @@ -1,3 +1,7 @@ +Wed Jun 6 20:31:26 UTC 2018 + Fix finding some DOS/Win partition types. Thanks to Stuart Winter. + Wipe the probe md5sum to force rescanning partitions if setup is restarted. ++--------------------------+ Sat Apr 28 20:04:23 UTC 2018 Reduce sleep times in the installer. You'll just have to read faster. ;-) +--------------------------+ diff --git a/source/installer/sources/initrd/bin/bash b/source/installer/sources/initrd/bin/bash new file mode 100755 index 000000000..f659f3699 --- /dev/null +++ b/source/installer/sources/initrd/bin/bash @@ -0,0 +1,2 @@ +#!/bin/ash +exec /bin/ash $* diff --git a/source/installer/sources/initrd/bin/compress b/source/installer/sources/initrd/bin/compress new file mode 120000 index 000000000..8483eff1e --- /dev/null +++ b/source/installer/sources/initrd/bin/compress @@ -0,0 +1 @@ +/usr/bin/compress
\ No newline at end of file diff --git a/source/installer/sources/initrd/bin/egrep b/source/installer/sources/initrd/bin/egrep new file mode 120000 index 000000000..c45b35b77 --- /dev/null +++ b/source/installer/sources/initrd/bin/egrep @@ -0,0 +1 @@ +grep.bin
\ No newline at end of file diff --git a/source/installer/sources/initrd/bin/fgrep b/source/installer/sources/initrd/bin/fgrep new file mode 120000 index 000000000..c45b35b77 --- /dev/null +++ b/source/installer/sources/initrd/bin/fgrep @@ -0,0 +1 @@ +grep.bin
\ No newline at end of file diff --git a/source/installer/sources/initrd/bin/filesize b/source/installer/sources/initrd/bin/filesize new file mode 100755 index 000000000..4c537edad --- /dev/null +++ b/source/installer/sources/initrd/bin/filesize @@ -0,0 +1,6 @@ +#!/bin/sh +# +# Print the size of a file, in bytes. +# +SIZE=`ls -l -d -G $1 | cut -b23-32` +echo -n $SIZE diff --git a/source/installer/sources/initrd/bin/grep b/source/installer/sources/initrd/bin/grep new file mode 120000 index 000000000..c45b35b77 --- /dev/null +++ b/source/installer/sources/initrd/bin/grep @@ -0,0 +1 @@ +grep.bin
\ No newline at end of file diff --git a/source/installer/sources/initrd/bin/network b/source/installer/sources/initrd/bin/network new file mode 100755 index 000000000..59637dd02 --- /dev/null +++ b/source/installer/sources/initrd/bin/network @@ -0,0 +1,41 @@ +#!/bin/sh +# This script configures support for ethernet cards needed during +# installation for an NFS install. +# +# Normally this automatically loads an image from the ISO, and if +# it cannot be found tries to load a floppy disk. +# +# You may also give a path to the network.dsk image, like this: +# network /some/exact/path/network.dsk +# + +TMP=/var/log/setup/tmp +mkdir -p $TMP/dhcpc + +echo +echo "Network support for NFS install, 2006-09-20 volkerdi@slackware.com" +echo "Network support for FTP/HTTP install, 26-Jan-2008 alien@slackware.com" +echo + +# Now, let's call the network.sh script to actually do most of the work: + +if [ -r /scripts/network.sh ]; then + sh /scripts/network.sh +fi + +# If we can get information from a local DHCP server, we store that for later: +if ! grep -wq nodhcp /proc/cmdline ; then + for EDEV in $(cat /proc/net/dev | grep ':' | sed -e "s/^ *//" | cut -f1 -d: | grep -v lo) ; do + if grep -q `echo ${EDEV}: | cut -f 1 -d :`: /proc/net/wireless ; then + continue # skip wireless interfaces + fi + /sbin/dhcpcd -t 10 -T $EDEV 1>$TMP/dhcpc/dhcpcd-${EDEV}.info 2>/dev/null & + done +fi + +echo +echo "The next step in your installation may be partitioning your hard drive" +echo "(if you're installing to a Linux partition) with 'fdisk' or 'cfdisk'" +echo "(the menu-driven version of fdisk). If you already have a partition" +echo "prepared for Linux, run 'setup' to start the installer program." +echo diff --git a/source/installer/sources/initrd/bin/pcmcia b/source/installer/sources/initrd/bin/pcmcia new file mode 100755 index 000000000..b77503deb --- /dev/null +++ b/source/installer/sources/initrd/bin/pcmcia @@ -0,0 +1,29 @@ +#!/bin/sh +# This script configures support for PCMCIA and/or Cardbus cards needed during +# installation, such as a CD-ROM drive or an ethernet card used for an NFS +# install. + +echo +echo "PCMCIA/Cardbus support script, 2003-02-18 volkerdi@slackware.com" +echo " 2007-05-09 alien@slackware.com" +echo + +# OK, here goes nothing: +/etc/rc.d/rc.pcmcia start + +echo +echo +echo "The PCMCIA/Cardbus subsystem is now installed. Please make sure that" +echo "all of the cards you'll need for the installation are in the machine." +echo "If you still need to insert any PCMCIA/Cardbus cards, do that now. Once" +echo "the drive stops (indicating that all needed modules have been" +echo -n "loaded), then press [enter] to continue." +read inputjunk +echo + +echo +echo "The next step in your installation may be partitioning your hard drive" +echo "(if you're installing to a Linux partition) with 'fdisk' or 'cfdisk'" +echo "(the menu-driven version of fdisk). If you already have a partition" +echo "prepared for Linux, run 'setup' to start the installer program." +echo diff --git a/source/installer/sources/initrd/bin/zcat b/source/installer/sources/initrd/bin/zcat new file mode 100755 index 000000000..569b15391 --- /dev/null +++ b/source/installer/sources/initrd/bin/zcat @@ -0,0 +1,56 @@ +#!/bin/sh +# Uncompress files to standard output. + +# Copyright (C) 2007 Free Software Foundation + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +bindir='/bin' +case $1 in +--__bindir) bindir=${2?}; shift; shift;; +esac +PATH=$bindir:$PATH + +version="zcat (gzip) 1.4 +Copyright (C) 2007, 2009-2010 Free Software Foundation, Inc. +This is free software. You may redistribute copies of it under the terms of +the GNU General Public License <http://www.gnu.org/licenses/gpl.html>. +There is NO WARRANTY, to the extent permitted by law. + +Written by Paul Eggert." + +usage="Usage: $0 [OPTION]... [FILE]... +Uncompress FILEs to standard output. + + -f, --force force; read compressed data even from a terminal + -l, --list list compressed file contents + -q, --quiet suppress all warnings + -r, --recursive operate recursively on directories + -S, --suffix=SUF use suffix SUF on compressed files + -t, --test test compressed file integrity + -v, --verbose verbose mode + --help display this help and exit + --version display version information and exit + +With no FILE, or when FILE is -, read standard input. + +Report bugs to <bug-gzip@gnu.org>." + +case $1 in +--help) exec echo "$usage";; +--version) exec echo "$version";; +esac + +exec gzip -cd "$@" diff --git a/source/installer/sources/initrd/boot b/source/installer/sources/initrd/boot new file mode 120000 index 000000000..cfecd6eb4 --- /dev/null +++ b/source/installer/sources/initrd/boot @@ -0,0 +1 @@ +/mnt/boot
\ No newline at end of file diff --git a/source/installer/sources/initrd/cdrom b/source/installer/sources/initrd/cdrom new file mode 120000 index 000000000..3f165753a --- /dev/null +++ b/source/installer/sources/initrd/cdrom @@ -0,0 +1 @@ +/var/log/mount
\ No newline at end of file diff --git a/source/installer/sources/initrd/dev/makedevs.sh b/source/installer/sources/initrd/dev/makedevs.sh new file mode 100755 index 000000000..8ecdb756e --- /dev/null +++ b/source/installer/sources/initrd/dev/makedevs.sh @@ -0,0 +1,260 @@ +#!/bin/sh +# This script makes /dev entries for hard drives listed in /proc/partitions. +# Written by Patrick Volkerding, licensed under the GPL (any version). +# Copyright 2001, 2002 Slackware Linux, Inc., Concord, CA + +# Many thanks to Vincent Rivellino for contributing the patches to support +# Mylex and Compaq RAID controllers. + +# Devfs enabled kernels don't use the old familiar device names in +# /proc/partitions, so we need to be able to figure them out on the +# basis of only the major/minor numbers. This will require some +# maintainance for a while, but we expect to require devfs soon enough, +# and that will help generalize the installation to new types of +# devices without requiring fixes from us. + +# Also, we're not yet ready to install with devfs _mounted_, so don't +# try that. :) + +# Main loop: +# First, determine if we are using old or new device names. The old format +# will never contain a '/' (Well, some RAID controllers could have them, +# but luckily we can handle those in the same way) + +# Make a device: +makedev() { + if [ ! -b $1 ]; then + mknod $1 b $2 $3 + chown root.disk $1 + chmod 640 $1 + fi +} + +# Make ide device +# makeide major minor hd1 hd2 (2 base devs for major) +make_ide() { + # Handle base devices: + if [ "$2" = "0" ]; then + makedev /dev/$3 $1 $2 + return 0 + elif [ "$2" = "64" ]; then + makedev /dev/$4 $1 $2 + return 0 + fi + # Must be a partition: + if [ "`expr $2 / 64`" = "0" ]; then + DEV=$3 + NUM=$2 + else + DEV=$4 + NUM=`expr $2 - 64` + fi + makedev /dev/$DEV$NUM $1 $2 +} + +# Make SCSI device +make_scsi() { + # find drive # 0 - 15 + DRV=`expr $1 / 16` + NUM=`expr $1 % 16` + if [ "$NUM" = "0" ]; then + NUM="" + fi + if [ "$DRV" = "0" ]; then + makedev /dev/sda$NUM 8 $1 + elif [ "$DRV" = "1" ]; then + makedev /dev/sdb$NUM 8 $1 + elif [ "$DRV" = "2" ]; then + makedev /dev/sdc$NUM 8 $1 + elif [ "$DRV" = "3" ]; then + makedev /dev/sdd$NUM 8 $1 + elif [ "$DRV" = "4" ]; then + makedev /dev/sde$NUM 8 $1 + elif [ "$DRV" = "5" ]; then + makedev /dev/sdf$NUM 8 $1 + elif [ "$DRV" = "6" ]; then + makedev /dev/sdg$NUM 8 $1 + elif [ "$DRV" = "7" ]; then + makedev /dev/sdh$NUM 8 $1 + elif [ "$DRV" = "8" ]; then + makedev /dev/sdi$NUM 8 $1 + elif [ "$DRV" = "9" ]; then + makedev /dev/sdj$NUM 8 $1 + elif [ "$DRV" = "10" ]; then + makedev /dev/sdk$NUM 8 $1 + elif [ "$DRV" = "11" ]; then + makedev /dev/sdl$NUM 8 $1 + elif [ "$DRV" = "12" ]; then + makedev /dev/sdm$NUM 8 $1 + elif [ "$DRV" = "13" ]; then + makedev /dev/sdn$NUM 8 $1 + elif [ "$DRV" = "14" ]; then + makedev /dev/sdo$NUM 8 $1 + elif [ "$DRV" = "15" ]; then + makedev /dev/sdp$NUM 8 $1 + fi +} + +# Make Mylex RAID device +make_rd() { + if [ ! -d /dev/rd ]; then + mkdir /dev/rd + fi + # find drive + DRV=`expr $3 / 8` + NUM="p`expr $3 % 8`" + if [ "$NUM" = "p0" ]; then + NUM="" + fi + makedev /dev/rd/c$1d$DRV$NUM $2 $3 +} + +# Make Cpq SMART/2 RAID device +make_ida() { + if [ ! -d /dev/ida ]; then + mkdir /dev/ida + fi + # find drive + DRV=`expr $3 / 16` + NUM="p`expr $3 % 16`" + if [ "$NUM" = "p0" ]; then + NUM="" + fi + makedev /dev/ida/c$1d$DRV$NUM $2 $3 +} + +# Make Compaq Next Generation RAID device +make_cciss() { + if [ ! -d /dev/cciss ]; then + mkdir /dev/cciss + fi + # find drive + DRV=`expr $3 / 16` + NUM="p`expr $3 % 16`" + if [ "$NUM" = "p0" ]; then + NUM="" + fi + makedev /dev/cciss/c$1d$DRV$NUM $2 $3 +} + +# Make ATA RAID device +make_ataraid() { + if [ ! -d /dev/ataraid ]; then + mkdir /dev/ataraid + fi + # find drive + DRV=`expr $2 / 16` + NUM=`expr $2 % 16` + if [ "$NUM" = "0" ]; then + makedev /dev/ataraid/d$DRV $1 $2 + else + makedev /dev/ataraid/d${DRV}p$NUM $1 $2 + fi +} + + +# Make AMI HyperRAID device: +make_amiraid() { + if [ ! -d /dev/amiraid ]; then + mkdir /dev/amiraid + fi + # find drive + DRV=`expr $2 / 16` + NUM=`expr $2 % 16` + if [ "$NUM" = "0" ]; then + makedev /dev/amiraid/ar$DRV $1 $2 + else + makedev /dev/amiraid/ar${DRV}p$NUM $1 $2 + fi +} + +if cat /proc/partitions | grep / 1> /dev/null 2> /dev/null ; then # new + cat /proc/partitions | grep / | while read line ; do + SMASHED_LINE=$line + MAJOR=`echo $SMASHED_LINE | cut -f 1 -d ' '` + MINOR=`echo $SMASHED_LINE | cut -f 2 -d ' '` + if [ "$MAJOR" = "3" ]; then + make_ide $MAJOR $MINOR hda hdb + elif [ "$MAJOR" = "8" ]; then + make_scsi $MINOR + elif [ "$MAJOR" = "22" ]; then + make_ide $MAJOR $MINOR hdc hdd + elif [ "$MAJOR" = "33" ]; then + make_ide $MAJOR $MINOR hde hdf + elif [ "$MAJOR" = "34" ]; then + make_ide $MAJOR $MINOR hdg hdh + elif [ "$MAJOR" = "48" ]; then + make_rd 0 $MAJOR $MINOR + elif [ "$MAJOR" = "49" ]; then + make_rd 1 $MAJOR $MINOR + elif [ "$MAJOR" = "50" ]; then + make_rd 2 $MAJOR $MINOR + elif [ "$MAJOR" = "51" ]; then + make_rd 3 $MAJOR $MINOR + elif [ "$MAJOR" = "52" ]; then + make_rd 4 $MAJOR $MINOR + elif [ "$MAJOR" = "53" ]; then + make_rd 5 $MAJOR $MINOR + elif [ "$MAJOR" = "54" ]; then + make_rd 6 $MAJOR $MINOR + elif [ "$MAJOR" = "55" ]; then + make_rd 7 $MAJOR $MINOR + elif [ "$MAJOR" = "56" ]; then + make_ide $MAJOR $MINOR hdi hdj + elif [ "$MAJOR" = "57" ]; then + make_ide $MAJOR $MINOR hdk hdl + elif [ "$MAJOR" = "72" ]; then + make_ida 0 $MAJOR $MINOR + elif [ "$MAJOR" = "73" ]; then + make_ida 1 $MAJOR $MINOR + elif [ "$MAJOR" = "74" ]; then + make_ida 2 $MAJOR $MINOR + elif [ "$MAJOR" = "75" ]; then + make_ida 3 $MAJOR $MINOR + elif [ "$MAJOR" = "76" ]; then + make_ida 4 $MAJOR $MINOR + elif [ "$MAJOR" = "77" ]; then + make_ida 5 $MAJOR $MINOR + elif [ "$MAJOR" = "78" ]; then + make_ida 6 $MAJOR $MINOR + elif [ "$MAJOR" = "79" ]; then + make_ida 7 $MAJOR $MINOR + elif [ "$MAJOR" = "88" ]; then + make_ide $MAJOR $MINOR hdm hdn + elif [ "$MAJOR" = "89" ]; then + make_ide $MAJOR $MINOR hdo hdp + elif [ "$MAJOR" = "90" ]; then + make_ide $MAJOR $MINOR hdq hdr + elif [ "$MAJOR" = "91" ]; then + make_ide $MAJOR $MINOR hds hdt + elif [ "$MAJOR" = "101" ]; then + make_amiraid $MAJOR $MINOR + elif [ "$MAJOR" = "104" ]; then + make_cciss 0 $MAJOR $MINOR + elif [ "$MAJOR" = "105" ]; then + make_cciss 1 $MAJOR $MINOR + elif [ "$MAJOR" = "106" ]; then + make_cciss 2 $MAJOR $MINOR + elif [ "$MAJOR" = "107" ]; then + make_cciss 3 $MAJOR $MINOR + elif [ "$MAJOR" = "108" ]; then + make_cciss 4 $MAJOR $MINOR + elif [ "$MAJOR" = "109" ]; then + make_cciss 5 $MAJOR $MINOR + elif [ "$MAJOR" = "110" ]; then + make_cciss 6 $MAJOR $MINOR + elif [ "$MAJOR" = "111" ]; then + make_cciss 7 $MAJOR $MINOR + elif [ "$MAJOR" = "114" ]; then + make_ataraid $MAJOR $MINOR + fi + done +else # old format + cat /proc/partitions | grep d | while read line ; do + SMASHED_LINE=$line + MAJOR=`echo $SMASHED_LINE | cut -f 1 -d ' '` + MINOR=`echo $SMASHED_LINE | cut -f 2 -d ' '` + DEVNAME=`echo $SMASHED_LINE | cut -f 4 -d ' '` + makedev /dev/$DEVNAME $MAJOR $MINOR + done +fi diff --git a/source/installer/sources/initrd/dev/mknodes.sh b/source/installer/sources/initrd/dev/mknodes.sh new file mode 100755 index 000000000..005e7bd5f --- /dev/null +++ b/source/installer/sources/initrd/dev/mknodes.sh @@ -0,0 +1,416 @@ +# Run this script in the root of the skeleton tree +# to re-create the required device nodes +mkdir -p dev +mknod -m 600 dev/tty3 c 4 3 +mkdir -p dev +mknod -m 660 dev/hdj b 56 64 +mkdir -p dev +mknod -m 660 dev/hdt b 91 64 +mkdir -p dev +mknod -m 660 dev/md15 b 9 15 +mkdir -p dev +mknod -m 640 dev/sr4 b 11 4 +mkdir -p dev +mknod -m 644 dev/ptyp2 c 2 2 +mkdir -p dev +mknod -m 640 dev/cdu535 b 24 0 +mkdir -p dev +mknod -m 600 dev/tcp c 18 3 +mkdir -p dev +mknod -m 644 dev/psaux c 10 1 +mkdir -p dev +mknod -m 640 dev/sjcd b 18 0 +mkdir -p dev +mknod -m 644 dev/tty9 c 4 9 +mkdir -p dev +mknod -m 640 dev/fd1h1200 b 2 9 +mkdir -p dev +mknod -m 600 dev/sgb c 21 1 +mkdir -p dev +mknod -m 640 dev/rmt16 c 12 8 +mkdir -p dev +mknod -m 640 dev/ttyS0 c 4 64 +mkdir -p dev +mknod -m 660 dev/hdn b 88 64 +mkdir -p dev +mknod -m 640 dev/fd0h1200 b 2 8 +mkdir -p dev +mknod -m 600 dev/ip c 18 1 +mkdir -p dev +mknod -m 640 dev/fd1h1440 b 2 41 +mkdir -p dev +mknod -m 700 dev/tty1 c 4 1 +mkdir -p dev +mknod -m 640 dev/tape-reset c 12 255 +mkdir -p dev +mknod -m 640 dev/eda1 b 36 1 +mkdir -p dev +mknod -m 640 dev/cm206cd b 32 0 +mkdir -p dev +mknod -m 660 dev/parport3 c 99 3 +mkdir -p dev +mknod -m 640 dev/sr1 b 11 1 +mkdir -p dev +mknod -m 660 dev/hdo b 89 0 +mkdir -p dev +mknod -m 640 dev/tape-d c 12 136 +mkdir -p dev +mknod -m 660 dev/hdq b 90 0 +mkdir -p dev +mknod -m 640 dev/st1 c 9 1 +mkdir -p dev +mknod -m 640 dev/optcd0 b 17 0 +mkdir -p dev +mknod -m 640 dev/sr3 b 11 3 +mkdir -p dev +mknod -m 640 dev/cua0 c 5 64 +mkdir -p dev +mknod -m 644 dev/urandom c 1 9 +mkdir -p dev +mknod -m 644 dev/tty c 5 0 +mkdir -p dev +mknod -m 640 dev/fd0 b 2 0 +mkdir -p dev +mknod -m 640 dev/eda b 36 0 +mkdir -p dev +mknod -m 640 dev/eda5 b 36 5 +mkdir -p dev +mknod -m 660 dev/md2 b 9 2 +mkdir -p dev +mknod -m 600 dev/tty2 c 4 2 +mkdir -p dev +mknod -m 644 dev/ptyp4 c 2 4 +mkdir -p dev +mknod -m 600 dev/console c 5 1 +mkdir -p dev +mknod -m 660 dev/md1 b 9 1 +mkdir -p dev +mknod -m 640 dev/par0 c 6 0 +mkdir -p dev +mknod -m 644 dev/tty7 c 4 7 +mkdir -p dev +mknod -m 644 dev/random c 1 8 +mkdir -p dev +mknod -m 640 dev/par2 c 6 2 +mkdir -p dev +mknod -m 640 dev/lmscd b 24 0 +mkdir -p dev +mknod -m 640 dev/sr0 b 11 0 +mkdir -p dev +mknod -m 640 dev/eda8 b 36 8 +mkdir -p dev +mknod -m 660 dev/hdh b 34 64 +mkdir -p dev +mknod -m 640 dev/sbpcd0 b 25 0 +mkdir -p dev +mknod -m 660 dev/hdm b 88 0 +mkdir -p dev +mknod -m 640 dev/pf2 b 47 2 +mkdir -p dev +mknod -m 640 dev/cua2 c 5 66 +mkdir -p dev +mknod -m 600 dev/sga c 21 0 +mkdir -p dev +mknod -m 640 dev/pda5 b 45 5 +mkdir -p dev +mknod -m 640 dev/ttyS2 c 4 66 +mkdir -p dev +mknod -m 640 dev/mcdx1 b 20 1 +mkdir -p dev +mknod -m 644 dev/ttyp4 c 3 4 +mkdir -p dev +mknod -m 640 dev/kmem c 1 2 +mkdir -p dev +mknod -m 640 dev/eda2 b 36 2 +mkdir -p dev +mknod -m 644 dev/ttyp8 c 3 8 +mkdir -p dev +mknod -m 600 dev/icmp c 18 2 +mkdir -p dev +mknod -m 640 dev/scd4 b 11 4 +mkdir -p dev +mknod -m 660 dev/md13 b 9 13 +mkdir -p dev +mknod -m 640 dev/sbpcd1 b 25 1 +mkdir -p dev +mknod -m 640 dev/pcd0 b 46 0 +mkdir -p dev +mknod -m 640 dev/rmt8 c 12 6 +mkdir -p dev +mknod -m 660 dev/hdc b 22 0 +mkdir -p dev +mknod -m 644 dev/logibm c 10 0 +mkdir -p dev +mknod -m 640 dev/scd1 b 11 1 +mkdir -p dev +mknod -m 660 dev/md10 b 9 10 +mkdir -p dev +mknod -m 660 dev/hds b 91 0 +mkdir -p dev +mknod -m 660 dev/hdl b 57 64 +mkdir -p dev +mknod -m 644 dev/socksys c 30 0 +mkdir -p dev +mknod -m 600 dev/tty6 c 4 6 +mkdir -p dev +mknod -m 660 dev/loop1 b 7 1 +mkdir -p dev +mknod -m 640 dev/bpcd b 41 0 +mkdir -p dev +mknod -m 660 dev/md3 b 9 3 +mkdir -p dev +mknod -m 640 dev/scd0 b 11 0 +mkdir -p dev +mknod -m 644 dev/ptyp3 c 2 3 +mkdir -p dev +mknod -m 640 dev/pf0 b 47 0 +mkdir -p dev +mknod -m 640 dev/gscd0 b 16 0 +mkdir -p dev +mknod -m 640 dev/fd0h1440 b 2 40 +mkdir -p dev +mknod -m 660 dev/hdi b 56 0 +mkdir -p dev +mknod -m 640 dev/cua4 c 5 68 +mkdir -p dev +mknod -m 660 dev/md12 b 9 12 +mkdir -p dev +mknod -m 660 dev/md8 b 9 8 +mkdir -p dev +mknod -m 640 dev/scd2 b 11 2 +mkdir -p dev +mknod -m 640 dev/mcdx0 b 20 0 +mkdir -p dev +mknod -m 640 dev/sbpcd b 25 0 +mkdir -p dev +mknod -m 660 dev/md5 b 9 5 +mkdir -p dev +mknod -m 600 dev/sgd c 21 3 +mkdir -p dev +mknod -m 644 dev/atibm c 10 3 +mkdir -p dev +mknod -m 644 dev/ptyp6 c 2 6 +mkdir -p dev +mknod -m 644 dev/null c 1 3 +mkdir -p dev +mknod -m 600 dev/udp c 18 4 +mkdir -p dev +mknod -m 660 dev/md9 b 9 9 +mkdir -p dev +mknod -m 660 dev/fd0u1680 b 2 44 +mkdir -p dev +mknod -m 640 dev/port c 1 4 +mkdir -p dev +mknod -m 640 dev/rft0 c 27 0 +mkdir -p dev +mknod -m 640 dev/st0 c 9 0 +mkdir -p dev +mknod -m 640 dev/ram1 b 1 1 +mkdir -p dev/input +mknod -m 644 dev/input/mice c 13 63 +mkdir -p dev/input +mknod -m 660 dev/input/keyboard c 10 150 +mkdir -p dev/input +mknod -m 644 dev/input/event0 c 13 64 +mkdir -p dev/input +mknod -m 660 dev/input/mouse c 10 149 +mkdir -p dev/input +mknod -m 644 dev/input/js0 c 13 0 +mkdir -p dev/input +mknod -m 644 dev/input/mouse0 c 13 32 +mkdir -p dev +mknod -m 640 dev/eda6 b 36 6 +mkdir -p dev +mknod -m 640 dev/pcd3 b 46 3 +mkdir -p dev +mknod -m 640 dev/pf3 b 47 3 +mkdir -p dev +mknod -m 640 dev/pcd2 b 46 2 +mkdir -p dev +mknod -m 640 dev/cua1 c 5 65 +mkdir -p dev +mknod -m 644 dev/zero c 1 5 +mkdir -p dev +mknod -m 660 dev/parport2 c 99 2 +mkdir -p dev +mknod -m 644 dev/inportbm c 10 2 +mkdir -p dev +mknod -m 644 dev/tty8 c 4 8 +mkdir -p dev +mknod -m 640 dev/sonycd b 15 0 +mkdir -p dev +mknod -m 600 dev/arp c 16 1 +mkdir -p dev +mknod -m 600 dev/sgf c 21 5 +mkdir -p dev +mknod -m 644 dev/full c 1 7 +mkdir -p dev +mknod -m 600 dev/sge c 21 4 +mkdir -p dev +mknod -m 644 dev/ptyp7 c 2 7 +mkdir -p dev +mknod -m 660 dev/loop3 b 7 3 +mkdir -p dev +mknod -m 640 dev/cua3 c 5 67 +mkdir -p dev +mknod -m 644 dev/ptyp0 c 2 0 +mkdir -p dev +mknod -m 600 dev/socket c 16 0 +mkdir -p dev +mknod -m 640 dev/par1 c 6 1 +mkdir -p dev +mknod -m 640 dev/nst0 c 9 128 +mkdir -p dev +mknod -m 640 dev/pcd1 b 46 1 +mkdir -p dev +mknod -m 700 dev/ttyp1 c 3 1 +mkdir -p dev +mknod -m 600 dev/tty4 c 4 4 +mkdir -p dev +mknod -m 640 dev/eda7 b 36 7 +mkdir -p dev +mknod -m 660 dev/parport1 c 99 1 +mkdir -p dev +mknod -m 600 dev/ttyp3 c 3 3 +mkdir -p dev +mknod -m 640 dev/nrft0 c 27 4 +mkdir -p dev +mknod -m 640 dev/ttyS4 c 4 68 +mkdir -p dev +mknod -m 640 dev/ram0 b 1 0 +mkdir -p dev +mknod -m 640 dev/nst1 c 9 129 +mkdir -p dev +mknod -m 644 dev/audio c 14 4 +mkdir -p dev +mknod -m 644 dev/ptyp8 c 2 8 +mkdir -p dev +mknod -m 660 dev/loop4 b 7 4 +mkdir -p dev +mknod -m 600 dev/tty5 c 4 5 +mkdir -p dev +mknod -m 660 dev/md6 b 9 6 +mkdir -p dev +mknod -m 640 dev/scd3 b 11 3 +mkdir -p dev +mknod -m 640 dev/pda b 45 0 +mkdir -p dev +mknod -m 644 dev/ptyp1 c 2 1 +mkdir -p dev +mknod -m 640 dev/fd1u1440 b 2 29 +mkdir -p dev +mknod -m 640 dev/eda4 b 36 4 +mkdir -p dev +mknod -m 600 dev/sgc c 21 2 +mkdir -p dev +mknod -m 640 dev/pda3 b 45 3 +mkdir -p dev +mknod -m 660 dev/hdf b 33 64 +mkdir -p dev +mknod -m 640 dev/ttyS1 c 4 65 +mkdir -p dev +mknod -m 640 dev/pda6 b 45 6 +mkdir -p dev +mknod -m 660 dev/md7 b 9 7 +mkdir -p dev +mknod -m 640 dev/lp0 c 6 0 +mkdir -p dev +mknod -m 640 dev/eda9 b 36 9 +mkdir -p dev +mknod -m 660 dev/hde b 33 0 +mkdir -p dev +mknod -m 660 dev/md4 b 9 4 +mkdir -p dev +mknod -m 640 dev/mem c 1 1 +mkdir -p dev +mknod -m 640 dev/fd1 b 2 1 +mkdir -p dev +mknod -m 644 dev/ttyp7 c 3 7 +mkdir -p dev +mknod -m 700 dev/ttyp2 c 3 2 +mkdir -p dev +mknod -m 660 dev/hdg b 34 0 +mkdir -p dev +mknod -m 660 dev/hdk b 57 0 +mkdir -p dev +mknod -m 644 dev/spx c 30 1 +mkdir -p dev +mknod -m 660 dev/md14 b 9 14 +mkdir -p dev +mknod -m 600 dev/sgg c 21 6 +mkdir -p dev +mknod -m 660 dev/hda b 3 0 +mkdir -p dev +mknod -m 640 dev/mcd b 23 0 +mkdir -p dev +mknod -m 640 dev/pda4 b 45 4 +mkdir -p dev/inet +mknod -m 644 dev/inet/tcp c 30 36 +mkdir -p dev/inet +mknod -m 644 dev/inet/ip c 30 32 +mkdir -p dev/inet +mknod -m 644 dev/inet/icmp c 30 33 +mkdir -p dev/inet +mknod -m 644 dev/inet/egp c 30 37 +mkdir -p dev/inet +mknod -m 644 dev/inet/idp c 30 40 +mkdir -p dev/inet +mknod -m 644 dev/inet/udp c 30 39 +mkdir -p dev/inet +mknod -m 644 dev/inet/pup c 30 38 +mkdir -p dev/inet +mknod -m 644 dev/inet/rawip c 30 41 +mkdir -p dev/inet +mknod -m 644 dev/inet/ggp c 30 34 +mkdir -p dev/inet +mknod -m 644 dev/inet/ipip c 30 35 +mkdir -p dev +mknod -m 644 dev/ptyp5 c 2 5 +mkdir -p dev +mknod -m 660 dev/hdb b 3 64 +mkdir -p dev +mknod -m 660 dev/hdr b 90 64 +mkdir -p dev +mknod -m 660 dev/hdd b 22 64 +mkdir -p dev +mknod -m 640 dev/pda1 b 45 1 +mkdir -p dev +mknod -m 640 dev/fd0u1440 b 2 28 +mkdir -p dev +mknod -m 640 dev/eda3 b 36 3 +mkdir -p dev +mknod -m 660 dev/fd0u1722 b 2 60 +mkdir -p dev +mknod -m 600 dev/unix c 17 0 +mkdir -p dev +mknod -m 640 dev/pf1 b 47 1 +mkdir -p dev +mknod -m 640 dev/sr2 b 11 2 +mkdir -p dev +mknod -m 660 dev/md0 b 9 0 +mkdir -p dev +mknod -m 640 dev/aztcd b 29 0 +mkdir -p dev +mknod -m 640 dev/pda2 b 45 2 +mkdir -p dev +mknod -m 660 dev/parport0 c 99 0 +mkdir -p dev +mknod -m 660 dev/loop0 b 7 0 +mkdir -p dev +mknod -m 660 dev/md11 b 9 11 +mkdir -p dev +mknod -m 640 dev/ttyS3 c 4 67 +mkdir -p dev +mknod -m 644 dev/ttyp6 c 3 6 +mkdir -p dev +mknod -m 600 dev/sgh c 21 7 +mkdir -p dev +mknod -m 644 dev/audio1 c 14 20 +mkdir -p dev +mknod -m 660 dev/hdp b 89 64 +mkdir -p dev +mknod -m 644 dev/ttyp0 c 3 0 +mkdir -p dev +mknod -m 600 dev/tty0 c 4 0 +mkdir -p dev +mknod -m 644 dev/ttyp5 c 3 5 diff --git a/source/installer/sources/initrd/etc/DIR_COLORS b/source/installer/sources/initrd/etc/DIR_COLORS new file mode 100644 index 000000000..13a21dfc0 --- /dev/null +++ b/source/installer/sources/initrd/etc/DIR_COLORS @@ -0,0 +1,166 @@ +# Configuration file for dircolors, a utility to help you set the +# LS_COLORS environment variable used by GNU ls with the --color option. + +# The keywords COLOR, OPTIONS, and EIGHTBIT (honored by the +# slackware version of dircolors) are recognized but ignored. +# (see the scripts in /etc/profile.d/coreutils-dircolors.* to change default +# options in the Slackware aliases) + +# Below, there should be one TERM entry for each termtype that is colorizable +TERM linux +TERM linux-c +TERM mach-color +TERM console +TERM con132x25 +TERM con132x30 +TERM con132x43 +TERM con132x60 +TERM con80x25 +TERM con80x28 +TERM con80x30 +TERM con80x43 +TERM con80x50 +TERM con80x60 +TERM cygwin +TERM dtterm +TERM putty +TERM xterm +TERM xterm-color +TERM xterm-debian +TERM rxvt +TERM screen +TERM screen-bce +TERM screen-w +TERM vt100 +TERM Eterm + +# Below are the color init strings for the basic file types. A color init +# string consists of one or more of the following numeric codes: +# Attribute codes: +# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed +# Text color codes: +# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white +# Background color codes: +# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white +NORMAL 00 # global default, although everything should be something. +FILE 00 # normal file +DIR 01;34 # directory +LINK 01;36 # symbolic link. (If you set this to 'target' instead of a + # numerical value, the color is as for the file pointed to.) +FIFO 40;33 # pipe +SOCK 01;35 # socket +DOOR 01;35 # door +BLK 40;33;01 # block device driver +CHR 40;33;01 # character device driver +ORPHAN 40;31;01 # symlink to nonexistent file +SETUID 37;41 # file that is setuid (u+s) +SETGID 30;43 # file that is setgid (g+s) +STICKY_OTHER_WRITABLE 30;42 # dir that is sticky and other-writable (+t,o+w) +OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky +STICKY 37;44 # dir with the sticky bit set (+t) and not other-writable +EXEC 01;32 # This is for files with execute permission: + +# List any file extensions like '.gz' or '.tar' that you would like ls +# to colorize below. Put the extension, a space, and the color init string. +# (and any comments you want to add after a '#') + +# DOS-style executables (bright green) +.bat 01;32 +.BAT 01;32 +.btm 01;32 +.BTM 01;32 +.cmd 01;32 +.CMD 01;32 +.com 01;32 +.COM 01;32 +.dll 01;32 +.DLL 01;32 +.exe 01;32 +.EXE 01;32 + +# archives or compressed (bright red) +.arj 01;31 +.bz2 01;31 +.deb 01;31 +.gz 01;31 +.lzh 01;31 +.rar 01;31 +.RAR 01;31 +.rpm 01;31 +.tar 01;31 +.taz 01;31 +.tb2 01;31 +.tbz2 01;31 +.tbz 01;31 +.tgz 01;31 +.tz2 01;31 +.z 01;31 +.Z 01;31 +.zip 01;31 +.ZIP 01;31 +.zoo 01;31 + +# multimedia (video/image/sound) file formats +.asf 01;35 +.ASF 01;35 +.avi 01;35 +.AVI 01;35 +.bmp 01;35 +.BMP 01;35 +.flac 01;35 +.FLAC 01;35 +.gif 01;35 +.GIF 01;35 +.jpg 01;35 +.JPG 01;35 +.jpeg 01;35 +.JPEG 01;35 +.m2a 01;35 +.M2A 01;35 +.m2v 01;35 +.M2V 01;35 +.m4a 01;35 +.M4A 01;35 +.m4p 01;35 +.M4P 01;35 +.m4v 01;35 +.M4V 01;35 +.mov 01;35 +.MOV 01;35 +.mp3 01;35 +.MP3 01;35 +.mpc 01;35 +.MPC 01;35 +.mpeg 01;35 +.MPEG 01;35 +.mpg 01;35 +.MPG 01;35 +.ogg 01;35 +.OGG 01;35 +.pbm 01;35 +.pgm 01;35 +.png 01;35 +.PNG 01;35 +.ppm 01;35 +.ram 01;35 +.RAM 01;35 +.rm 01;35 +.RM 01;35 +.tga 01;35 +.TGA 01;35 +.tif 01;35 +.TIF 01;35 +.tiff 01;35 +.TIFF 01;35 +.wav 01;35 +.WAV 01;35 +.wma 01;35 +.WMA 01;35 +.wmv 01;35 +.WMV 01;35 +.xbm 01;35 +.xcf 01;35 +.xpm 01;35 +.xwd 01;35 +.XWD 01;35 + diff --git a/source/installer/sources/initrd/etc/HOSTNAME b/source/installer/sources/initrd/etc/HOSTNAME new file mode 100644 index 000000000..23169fd62 --- /dev/null +++ b/source/installer/sources/initrd/etc/HOSTNAME @@ -0,0 +1 @@ +slackware.example.net diff --git a/source/installer/sources/initrd/etc/dhcpc/dhcpcd.exe-sample b/source/installer/sources/initrd/etc/dhcpc/dhcpcd.exe-sample new file mode 100755 index 000000000..f49cffdd0 --- /dev/null +++ b/source/installer/sources/initrd/etc/dhcpc/dhcpcd.exe-sample @@ -0,0 +1,49 @@ +#!/bin/sh +# +# This is a sample /etc/dhcpc/dhcpcd.exe script. +# /etc/dhcpc/dhcpcd.exe script is executed by dhcpcd daemon +# any time it configures or shuts down interface. +# The following parameters are passed to dhcpcd.exe script: +# $1 = HostInfoFilePath, e.g "/etc/dhcpc/dhcpcd-eth0.info" +# $2 = "up" if interface has been configured with the same +# IP address as before reboot; +# $2 = "down" if interface has been shut down; +# $2 = "new" if interface has been configured with new IP address; +# $3 (optional) = "-d" debug flag passed if dhcpcd daemon has been +# invoked with "-d" flag +# +# Sanity checks + +if [ $# -lt 2 ]; then + logger -s -p local0.err -t dhcpcd.exe "wrong usage" + exit 1 +fi + +hostinfo="$1" +state="$2" +debug="$3" + +# Reading HostInfo file for configuration parameters +. "${hostinfo}" + +case "${state}" in + up) + logger -s -p local0.info -t dhcpcd.exe \ + "interface ${INTERFACE} has been configured with old IP=${IPADDR}" + # Put your code here for when the interface has been brought up with an + # old IP address here + ;; + + new) + logger -s -p local0.info -t dhcpcd.exe \ + "interface ${INTERFACE} has been configured with new IP=${IPADDR}" + # Put your code here for when the interface has been brought up with a + # new IP address + ;; + + down) logger -s -p local0.info -t dhcpcd.exe \ + "interface ${INTERFACE} has been brought down" + # Put your code here for the when the interface has been shut down + ;; +esac +exit 0 diff --git a/source/installer/sources/initrd/etc/disk2 b/source/installer/sources/initrd/etc/disk2 new file mode 100644 index 000000000..6a80aac22 --- /dev/null +++ b/source/installer/sources/initrd/etc/disk2 @@ -0,0 +1,7 @@ +Hi there. :-) + +This file is used to determine if the second install "disk" +is already loaded or not... if it's not found in /etc, then +the boot scripts will ask you to insert the second install +floppy. + diff --git a/source/installer/sources/initrd/etc/dnsmasq.conf b/source/installer/sources/initrd/etc/dnsmasq.conf new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/source/installer/sources/initrd/etc/dnsmasq.conf diff --git a/source/installer/sources/initrd/etc/fstab b/source/installer/sources/initrd/etc/fstab new file mode 100644 index 000000000..0fdb74a70 --- /dev/null +++ b/source/installer/sources/initrd/etc/fstab @@ -0,0 +1,3 @@ +devpts /dev/pts devpts gid=5,mode=620 0 0 +proc /proc proc defaults 0 0 +tmpfs /dev/shm tmpfs defaults 0 0 diff --git a/source/installer/sources/initrd/etc/group b/source/installer/sources/initrd/etc/group new file mode 100644 index 000000000..8e9154a19 --- /dev/null +++ b/source/installer/sources/initrd/etc/group @@ -0,0 +1,44 @@ +root:x:0:root +bin:x:1:root,bin +daemon:x:2:root,bin,daemon +sys:x:3:root,bin,adm +adm:x:4:root,adm,daemon +tty:x:5: +disk:x:6:root,adm +lp:x:7:lp +mem:x:8: +kmem:x:9: +wheel:x:10:root +floppy:x:11:root +mail:x:12:mail +news:x:13:news +uucp:x:14:uucp +man:x:15: +dialout:x:16:uucp +audio:x:17:root +video:x:18:root +cdrom:x:19:root +games:x:20: +slocate:x:21: +utmp:x:22: +smmsp:x:25:smmsp +tape:x:26:root +mysql:x:27: +rpc:x:32: +sshd:x:33:sshd +gdm:x:42: +shadow:x:43: +ftp:x:50: +oprofile:x:51: +apache:x:80: +messagebus:x:81: +haldaemon:x:82: +plugdev:x:83:root +power:x:84: +netdev:x:86: +pop:x:90:pop +scanner:x:93: +nobody:x:98:nobody +nogroup:x:99: +users:x:100: +console:x:101: diff --git a/source/installer/sources/initrd/etc/host.conf b/source/installer/sources/initrd/etc/host.conf new file mode 100644 index 000000000..a659e913a --- /dev/null +++ b/source/installer/sources/initrd/etc/host.conf @@ -0,0 +1,2 @@ +order hosts, bind +multi on diff --git a/source/installer/sources/initrd/etc/hosts b/source/installer/sources/initrd/etc/hosts new file mode 100644 index 000000000..bc4ad4f13 --- /dev/null +++ b/source/installer/sources/initrd/etc/hosts @@ -0,0 +1,21 @@ +# +# hosts This file describes a number of hostname-to-address +# mappings for the TCP/IP subsystem. It is mostly +# used at boot time, when no name servers are running. +# On small systems, this file can be used instead of a +# "named" name server. Just add the names, addresses +# and any aliases to this file... +# +# By the way, Arnt Gulbrandsen <agulbra@nvg.unit.no> says that 127.0.0.1 +# should NEVER be named with the name of the machine. It causes problems +# for some (stupid) programs, irc and reputedly talk. :^) +# + +# For loopbacking. +127.0.0.1 localhost +# This next entry is technically wrong, but good enough to get TCP/IP apps +# to quit complaining that they can't verify the hostname on a loopback-only +# Linux box. +127.0.0.1 slackware.example.net slackware + +# End of hosts. diff --git a/source/installer/sources/initrd/etc/inittab b/source/installer/sources/initrd/etc/inittab new file mode 100644 index 000000000..2695f00e0 --- /dev/null +++ b/source/installer/sources/initrd/etc/inittab @@ -0,0 +1,40 @@ +# /etc/inittab +# Boot-time system configuration/initialization script. +# This is run first except when booting in single-user mode. +::sysinit:/etc/rc.d/rc.S + +# Login /bin/sh invocations on selected ttys. +# +# Start a shell on the console +::respawn:-/bin/sh +# Start an "askfirst" shell on tty2 and tty3 +tty2::askfirst:-/bin/sh +tty3::askfirst:-/bin/sh + +# /sbin/getty invocations for selected ttys. +# +#tty1::respawn:/sbin/getty 38400 tty1 +#tty2::respawn:/sbin/getty 38400 tty2 + +# Example of how to put a getty on a serial line (for a terminal) +# +#ttyS0::respawn:/sbin/getty -L ttyS0 9600 vt100 +#ttyS1::respawn:/sbin/getty -L ttyS1 9600 vt100 +# +# Example how to put a getty on a modem line. +#ttyS2::respawn:/sbin/getty -x0 -s 57600 ttyS2 + +# Reboot when ctrl-alt-del keys are pressed. +::ctrlaltdel:/sbin/reboot +#::ctrlaltdel:/sbin/brc + +# Stuff to do before halting or rebooting. +# Hopefully it does these things in order, so that we can fake the +# system date one last time before umounting: +::shutdown:/bin/sh /sbin/fakedate +::shutdown:/sbin/swapoff -a >/dev/null 2>&1 +::shutdown:/bin/umount -a -r >/dev/null 2>&1 +::shutdown:/sbin/vgchange -an --ignorelockingfailure >/dev/null 2>&1 +# Otherwise SSH logins are left lingering: +::shutdown:/bin/killall dropbear > /dev/null 2>&1 +::shutdown:/bin/sh /sbin/fixdate diff --git a/source/installer/sources/initrd/etc/installer b/source/installer/sources/initrd/etc/installer new file mode 100644 index 000000000..e2af85b91 --- /dev/null +++ b/source/installer/sources/initrd/etc/installer @@ -0,0 +1 @@ +If /etc/installer exists, it's a cue to scripts that we're on the installer. diff --git a/source/installer/sources/initrd/etc/issue b/source/installer/sources/initrd/etc/issue new file mode 100644 index 000000000..8b2ac3360 --- /dev/null +++ b/source/installer/sources/initrd/etc/issue @@ -0,0 +1,25 @@ + + + + +Welcome to the Slackware Linux installation disk! (version 12.2) + +###### IMPORTANT! READ THE INFORMATION BELOW CAREFULLY. ###### + +- You will need one or more partitions of type 'Linux' prepared. It is also + recommended that you create a swap partition (type 'Linux swap') prior + to installation. For more information, run 'setup' and read the help file. + +- If you're having problems that you think might be related to low memory, you + can try activating a swap partition before you run setup. After making a + swap partition (type 82) with cfdisk or fdisk, activate it like this: + mkswap /dev/<partition> ; swapon /dev/<partition> + +- Once you have prepared the disk partitions for Linux, type 'setup' to begin + the installation process. + +- If you do not have a color monitor, type: TERM=vt100 + before you start 'setup'. + +You may now login as 'root'. + diff --git a/source/installer/sources/initrd/etc/keymaps.tar b/source/installer/sources/initrd/etc/keymaps.tar Binary files differnew file mode 100644 index 000000000..2ae6004b7 --- /dev/null +++ b/source/installer/sources/initrd/etc/keymaps.tar diff --git a/source/installer/sources/initrd/etc/ld.so.cache b/source/installer/sources/initrd/etc/ld.so.cache Binary files differnew file mode 100644 index 000000000..ea1fb85b3 --- /dev/null +++ b/source/installer/sources/initrd/etc/ld.so.cache diff --git a/source/installer/sources/initrd/etc/ld.so.conf b/source/installer/sources/initrd/etc/ld.so.conf new file mode 100644 index 000000000..61b171c81 --- /dev/null +++ b/source/installer/sources/initrd/etc/ld.so.conf @@ -0,0 +1,2 @@ +/lib +/usr/lib diff --git a/source/installer/sources/initrd/etc/localtime b/source/installer/sources/initrd/etc/localtime Binary files differnew file mode 100644 index 000000000..5583f5b0c --- /dev/null +++ b/source/installer/sources/initrd/etc/localtime diff --git a/source/installer/sources/initrd/etc/login.defs b/source/installer/sources/initrd/etc/login.defs new file mode 100644 index 000000000..bcbdb2f0f --- /dev/null +++ b/source/installer/sources/initrd/etc/login.defs @@ -0,0 +1,68 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# $Id: login.defs.linux,v 1.10 1999/03/07 19:14:33 marekm Exp $ +FAIL_DELAY 3 +DIALUPS_CHECK_ENAB yes +FAILLOG_ENAB yes +LOG_UNKFAIL_ENAB no +LOG_OK_LOGINS no +LASTLOG_ENAB yes +MAIL_CHECK_ENAB no +OBSCURE_CHECKS_ENAB yes +PORTTIME_CHECKS_ENAB yes +QUOTAS_ENAB yes +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes +CONSOLE /etc/securetty +#CONSOLE console:tty01:tty02:tty03:tty04 +#SULOG_FILE /var/log/sulog +MOTD_FILE /etc/motd +#MOTD_FILE /etc/motd:/usr/lib/news/news-motd +#ISSUE_FILE /etc/issue +#TTYTYPE_FILE /etc/ttytype +FTMP_FILE /var/log/btmp +NOLOGINS_FILE /etc/nologin +SU_NAME su +#QMAIL_DIR Maildir +MAIL_DIR /var/spool/mail +#MAIL_FILE .mail +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins +NOLOGIN_STR NOLOGIN +#ENV_TZ TZ=CST6CDT +#ENV_TZ /etc/tzname +ENV_HZ HZ=100 +#ENV_HZ HZ=1024 +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/bin:/usr/bin +ENV_PATH PATH=/usr/local/bin:/bin:/usr/bin +TTYGROUP tty +TTYPERM 0620 +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 +#ULIMIT 2097152 +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_MIN_LEN 5 +PASS_WARN_AGE 7 +SU_WHEEL_ONLY no +#CRACKLIB_DICTPATH /var/cache/cracklib/cracklib_dict +UID_MIN 1000 +UID_MAX 60000 +GID_MIN 100 +GID_MAX 60000 +LOGIN_RETRIES 5 +LOGIN_TIMEOUT 60 +PASS_CHANGE_TRIES 5 +PASS_ALWAYS_WARN yes +#PASS_MAX_LEN 8 +CHFN_AUTH yes +CHFN_RESTRICT frwh +#LOGIN_STRING "%s's Password: " +MD5_CRYPT_ENAB yes +#CONSOLE_GROUPS floppy:audio:cdrom +DEFAULT_HOME yes +ENVIRON_FILE /etc/environment +#USERDEL_CMD /usr/sbin/userdel_local +#NO_PASSWORD_CONSOLE tty1:tty2:tty3:tty4:tty5:tty6 diff --git a/source/installer/sources/initrd/etc/lvm/lvm.conf b/source/installer/sources/initrd/etc/lvm/lvm.conf new file mode 100644 index 000000000..16cefb2f1 --- /dev/null +++ b/source/installer/sources/initrd/etc/lvm/lvm.conf @@ -0,0 +1,411 @@ +# This is an example configuration file for the LVM2 system. +# It contains the default settings that would be used if there was no +# /etc/lvm/lvm.conf file. +# +# Refer to 'man lvm.conf' for further information including the file layout. +# +# To put this file in a different directory and override /etc/lvm set +# the environment variable LVM_SYSTEM_DIR before running the tools. + + +# This section allows you to configure which block devices should +# be used by the LVM system. +devices { + + # Where do you want your volume groups to appear ? + dir = "/dev" + + # An array of directories that contain the device nodes you wish + # to use with LVM2. + scan = [ "/dev" ] + + # If several entries in the scanned directories correspond to the + # same block device and the tools need to display a name for device, + # all the pathnames are matched against each item in the following + # list of regular expressions in turn and the first match is used. + preferred_names = [ ] + + # Try to avoid using undescriptive /dev/dm-N names, if present. + # preferred_names = [ "^/dev/mpath/", "^/dev/mapper/mpath", "^/dev/[hs]d" ] + + # A filter that tells LVM2 to only use a restricted set of devices. + # The filter consists of an array of regular expressions. These + # expressions can be delimited by a character of your choice, and + # prefixed with either an 'a' (for accept) or 'r' (for reject). + # The first expression found to match a device name determines if + # the device will be accepted or rejected (ignored). Devices that + # don't match any patterns are accepted. + + # Be careful if there there are symbolic links or multiple filesystem + # entries for the same device as each name is checked separately against + # the list of patterns. The effect is that if any name matches any 'a' + # pattern, the device is accepted; otherwise if any name matches any 'r' + # pattern it is rejected; otherwise it is accepted. + + # Don't have more than one filter line active at once: only one gets used. + + # Run vgscan after you change this parameter to ensure that + # the cache file gets regenerated (see below). + # If it doesn't do what you expect, check the output of 'vgscan -vvvv'. + + + # By default we accept every block device: + filter = [ "a/.*/" ] + + # Exclude the cdrom drive + # filter = [ "r|/dev/cdrom|" ] + + # When testing I like to work with just loopback devices: + # filter = [ "a/loop/", "r/.*/" ] + + # Or maybe all loops and ide drives except hdc: + # filter =[ "a|loop|", "r|/dev/hdc|", "a|/dev/ide|", "r|.*|" ] + + # Use anchors if you want to be really specific + # filter = [ "a|^/dev/hda8$|", "r/.*/" ] + + # The results of the filtering are cached on disk to avoid + # rescanning dud devices (which can take a very long time). + # By default this cache is stored in the /etc/lvm/cache directory + # in a file called '.cache'. + # It is safe to delete the contents: the tools regenerate it. + # (The old setting 'cache' is still respected if neither of + # these new ones is present.) + cache_dir = "/etc/lvm/cache" + cache_file_prefix = "" + + # You can turn off writing this cache file by setting this to 0. + write_cache_state = 1 + + # Advanced settings. + + # List of pairs of additional acceptable block device types found + # in /proc/devices with maximum (non-zero) number of partitions. + # types = [ "fd", 16 ] + + # If sysfs is mounted (2.6 kernels) restrict device scanning to + # the block devices it believes are valid. + # 1 enables; 0 disables. + sysfs_scan = 1 + + # By default, LVM2 will ignore devices used as components of + # software RAID (md) devices by looking for md superblocks. + # 1 enables; 0 disables. + md_component_detection = 1 + + # By default, if a PV is placed directly upon an md device, LVM2 + # will align its data blocks with the the chunk_size exposed in sysfs. + # 1 enables; 0 disables. + md_chunk_alignment = 1 + + # If, while scanning the system for PVs, LVM2 encounters a device-mapper + # device that has its I/O suspended, it waits for it to become accessible. + # Set this to 1 to skip such devices. This should only be needed + # in recovery situations. + ignore_suspended_devices = 0 +} + +# This section that allows you to configure the nature of the +# information that LVM2 reports. +log { + + # Controls the messages sent to stdout or stderr. + # There are three levels of verbosity, 3 being the most verbose. + verbose = 0 + + # Should we send log messages through syslog? + # 1 is yes; 0 is no. + syslog = 1 + + # Should we log error and debug messages to a file? + # By default there is no log file. + #file = "/var/log/lvm2.log" + + # Should we overwrite the log file each time the program is run? + # By default we append. + overwrite = 0 + + # What level of log messages should we send to the log file and/or syslog? + # There are 6 syslog-like log levels currently in use - 2 to 7 inclusive. + # 7 is the most verbose (LOG_DEBUG). + level = 0 + + # Format of output messages + # Whether or not (1 or 0) to indent messages according to their severity + indent = 1 + + # Whether or not (1 or 0) to display the command name on each line output + command_names = 0 + + # A prefix to use before the message text (but after the command name, + # if selected). Default is two spaces, so you can see/grep the severity + # of each message. + prefix = " " + + # To make the messages look similar to the original LVM tools use: + # indent = 0 + # command_names = 1 + # prefix = " -- " + + # Set this if you want log messages during activation. + # Don't use this in low memory situations (can deadlock). + # activation = 0 +} + +# Configuration of metadata backups and archiving. In LVM2 when we +# talk about a 'backup' we mean making a copy of the metadata for the +# *current* system. The 'archive' contains old metadata configurations. +# Backups are stored in a human readeable text format. +backup { + + # Should we maintain a backup of the current metadata configuration ? + # Use 1 for Yes; 0 for No. + # Think very hard before turning this off! + backup = 1 + + # Where shall we keep it ? + # Remember to back up this directory regularly! + backup_dir = "/etc/lvm/backup" + + # Should we maintain an archive of old metadata configurations. + # Use 1 for Yes; 0 for No. + # On by default. Think very hard before turning this off. + archive = 1 + + # Where should archived files go ? + # Remember to back up this directory regularly! + archive_dir = "/etc/lvm/archive" + + # What is the minimum number of archive files you wish to keep ? + retain_min = 10 + + # What is the minimum time you wish to keep an archive file for ? + retain_days = 30 +} + +# Settings for the running LVM2 in shell (readline) mode. +shell { + + # Number of lines of history to store in ~/.lvm_history + history_size = 100 +} + + +# Miscellaneous global LVM2 settings +global { + + # The file creation mask for any files and directories created. + # Interpreted as octal if the first digit is zero. + umask = 077 + + # Allow other users to read the files + #umask = 022 + + # Enabling test mode means that no changes to the on disk metadata + # will be made. Equivalent to having the -t option on every + # command. Defaults to off. + test = 0 + + # Default value for --units argument + units = "h" + + # Whether or not to communicate with the kernel device-mapper. + # Set to 0 if you want to use the tools to manipulate LVM metadata + # without activating any logical volumes. + # If the device-mapper kernel driver is not present in your kernel + # setting this to 0 should suppress the error messages. + activation = 1 + + # If we can't communicate with device-mapper, should we try running + # the LVM1 tools? + # This option only applies to 2.4 kernels and is provided to help you + # switch between device-mapper kernels and LVM1 kernels. + # The LVM1 tools need to be installed with .lvm1 suffices + # e.g. vgscan.lvm1 and they will stop working after you start using + # the new lvm2 on-disk metadata format. + # The default value is set when the tools are built. + # fallback_to_lvm1 = 0 + + # The default metadata format that commands should use - "lvm1" or "lvm2". + # The command line override is -M1 or -M2. + # Defaults to "lvm1" if compiled in, else "lvm2". + # format = "lvm1" + + # Location of proc filesystem + proc = "/proc" + + # Type of locking to use. Defaults to local file-based locking (1). + # Turn locking off by setting to 0 (dangerous: risks metadata corruption + # if LVM2 commands get run concurrently). + # Type 2 uses the external shared library locking_library. + # Type 3 uses built-in clustered locking. + locking_type = 1 + + # If using external locking (type 2) and initialisation fails, + # with this set to 1 an attempt will be made to use the built-in + # clustered locking. + # If you are using a customised locking_library you should set this to 0. + fallback_to_clustered_locking = 1 + + # If an attempt to initialise type 2 or type 3 locking failed, perhaps + # because cluster components such as clvmd are not running, with this set + # to 1 an attempt will be made to use local file-based locking (type 1). + # If this succeeds, only commands against local volume groups will proceed. + # Volume Groups marked as clustered will be ignored. + fallback_to_local_locking = 1 + + # Local non-LV directory that holds file-based locks while commands are + # in progress. A directory like /tmp that may get wiped on reboot is OK. + locking_dir = "/var/lock/lvm" + + # Other entries can go here to allow you to load shared libraries + # e.g. if support for LVM1 metadata was compiled as a shared library use + # format_libraries = "liblvm2format1.so" + # Full pathnames can be given. + + # Search this directory first for shared libraries. + # library_dir = "/lib" + + # The external locking library to load if locking_type is set to 2. + # locking_library = "liblvm2clusterlock.so" +} + +activation { + # How to fill in missing stripes if activating an incomplete volume. + # Using "error" will make inaccessible parts of the device return + # I/O errors on access. You can instead use a device path, in which + # case, that device will be used to in place of missing stripes. + # But note that using anything other than "error" with mirrored + # or snapshotted volumes is likely to result in data corruption. + missing_stripe_filler = "error" + + # How much stack (in KB) to reserve for use while devices suspended + reserved_stack = 256 + + # How much memory (in KB) to reserve for use while devices suspended + reserved_memory = 8192 + + # Nice value used while devices suspended + process_priority = -18 + + # If volume_list is defined, each LV is only activated if there is a + # match against the list. + # "vgname" and "vgname/lvname" are matched exactly. + # "@tag" matches any tag set in the LV or VG. + # "@*" matches if any tag defined on the host is also set in the LV or VG + # + # volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ] + + # Size (in KB) of each copy operation when mirroring + mirror_region_size = 512 + + # Setting to use when there is no readahead value stored in the metadata. + # + # "none" - Disable readahead. + # "auto" - Use default value chosen by kernel. + readahead = "auto" + + # 'mirror_image_fault_policy' and 'mirror_log_fault_policy' define + # how a device failure affecting a mirror is handled. + # A mirror is composed of mirror images (copies) and a log. + # A disk log ensures that a mirror does not need to be re-synced + # (all copies made the same) every time a machine reboots or crashes. + # + # In the event of a failure, the specified policy will be used to + # determine what happens: + # + # "remove" - Simply remove the faulty device and run without it. If + # the log device fails, the mirror would convert to using + # an in-memory log. This means the mirror will not + # remember its sync status across crashes/reboots and + # the entire mirror will be re-synced. If a + # mirror image fails, the mirror will convert to a + # non-mirrored device if there is only one remaining good + # copy. + # + # "allocate" - Remove the faulty device and try to allocate space on + # a new device to be a replacement for the failed device. + # Using this policy for the log is fast and maintains the + # ability to remember sync state through crashes/reboots. + # Using this policy for a mirror device is slow, as it + # requires the mirror to resynchronize the devices, but it + # will preserve the mirror characteristic of the device. + # This policy acts like "remove" if no suitable device and + # space can be allocated for the replacement. + # Currently this is not implemented properly and behaves + # similarly to: + # + # "allocate_anywhere" - Operates like "allocate", but it does not + # require that the new space being allocated be on a + # device is not part of the mirror. For a log device + # failure, this could mean that the log is allocated on + # the same device as a mirror device. For a mirror + # device, this could mean that the mirror device is + # allocated on the same device as another mirror device. + # This policy would not be wise for mirror devices + # because it would break the redundant nature of the + # mirror. This policy acts like "remove" if no suitable + # device and space can be allocated for the replacement. + + mirror_log_fault_policy = "allocate" + mirror_device_fault_policy = "remove" +} + + +#################### +# Advanced section # +#################### + +# Metadata settings +# +# metadata { + # Default number of copies of metadata to hold on each PV. 0, 1 or 2. + # You might want to override it from the command line with 0 + # when running pvcreate on new PVs which are to be added to large VGs. + + # pvmetadatacopies = 1 + + # Approximate default size of on-disk metadata areas in sectors. + # You should increase this if you have large volume groups or + # you want to retain a large on-disk history of your metadata changes. + + # pvmetadatasize = 255 + + # List of directories holding live copies of text format metadata. + # These directories must not be on logical volumes! + # It's possible to use LVM2 with a couple of directories here, + # preferably on different (non-LV) filesystems, and with no other + # on-disk metadata (pvmetadatacopies = 0). Or this can be in + # addition to on-disk metadata areas. + # The feature was originally added to simplify testing and is not + # supported under low memory situations - the machine could lock up. + # + # Never edit any files in these directories by hand unless you + # you are absolutely sure you know what you are doing! Use + # the supplied toolset to make changes (e.g. vgcfgrestore). + + # dirs = [ "/etc/lvm/metadata", "/mnt/disk2/lvm/metadata2" ] +#} + +# Event daemon +# +# dmeventd { + # mirror_library is the library used when monitoring a mirror device. + # + # "libdevmapper-event-lvm2mirror.so" attempts to recover from + # failures. It removes failed devices from a volume group and + # reconfigures a mirror as necessary. If no mirror library is + # provided, mirrors are not monitored through dmeventd. + + # mirror_library = "libdevmapper-event-lvm2mirror.so" + + # snapshot_library is the library used when monitoring a snapshot device. + # + # "libdevmapper-event-lvm2snapshot.so" monitors the filling of + # snapshots and emits a warning through syslog, when the use of + # snapshot exceedes 80%. The warning is repeated when 85%, 90% and + # 95% of the snapshot are filled. + + # snapshot_library = "libdevmapper-event-lvm2snapshot.so" +#} + diff --git a/source/installer/sources/initrd/etc/mdev.conf b/source/installer/sources/initrd/etc/mdev.conf new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/source/installer/sources/initrd/etc/mdev.conf diff --git a/source/installer/sources/initrd/etc/mke2fs.conf b/source/installer/sources/initrd/etc/mke2fs.conf new file mode 100644 index 000000000..3795b1ed6 --- /dev/null +++ b/source/installer/sources/initrd/etc/mke2fs.conf @@ -0,0 +1,44 @@ +[defaults] + base_features = sparse_super,filetype,resize_inode,dir_index,ext_attr + blocksize = 4096 + inode_size = 256 + inode_ratio = 16384 + +[fs_types] + ext3 = { + features = has_journal + } + ext4 = { + features = has_journal,extents,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize + inode_size = 256 + } + ext4dev = { + features = has_journal,extents,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize + inode_size = 256 + options = test_fs=1 + } + small = { + blocksize = 1024 + inode_size = 128 + inode_ratio = 4096 + } + floppy = { + blocksize = 1024 + inode_size = 128 + inode_ratio = 8192 + } + news = { + inode_ratio = 4096 + } + largefile = { + inode_ratio = 1048576 + blocksize = -1 + } + largefile4 = { + inode_ratio = 4194304 + blocksize = -1 + } + hurd = { + blocksize = 4096 + inode_size = 128 + } diff --git a/source/installer/sources/initrd/etc/motd b/source/installer/sources/initrd/etc/motd new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/source/installer/sources/initrd/etc/motd diff --git a/source/installer/sources/initrd/etc/mtab b/source/installer/sources/initrd/etc/mtab new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/source/installer/sources/initrd/etc/mtab diff --git a/source/installer/sources/initrd/etc/mtools.conf b/source/installer/sources/initrd/etc/mtools.conf new file mode 100644 index 000000000..b528c01d6 --- /dev/null +++ b/source/installer/sources/initrd/etc/mtools.conf @@ -0,0 +1,64 @@ +# Example mtools.conf files. Uncomment the lines which correspond to +# your architecture and comment out the "SAMPLE FILE" line below +#SAMPLE FILE + +# # Linux floppy drives +drive a: file="/dev/fd0" exclusive +drive b: file="/dev/fd1" exclusive + +# # First SCSI hard disk partition +# drive c: file="/dev/sda1" + +# # First IDE hard disk partition +# drive c: file="/dev/hda1" + +# # dosemu floppy image +# drive m: file="/var/lib/dosemu/diskimage" + +# # dosemu hdimage +# drive n: file="/var/lib/dosemu/diskimage" offset=3840 + +# # Atari ramdisk image +# drive o: file="/tmp/atari_rd" offset=136 + +# # ZIP disk for Solaris: +# Drive X is ZIP-100 at target 5 +# drive X: file="/dev/rdsk/c0t5d0s2" partition=4 scsi=1 nodelay + +# # ZIP disk for SunOS: +# # Zip drive is at target 5, which default kernel calls tape st1 !! +# drive Y: file="/dev/rsd5c" partition=4 scsi=1 nodelay + +# # autoselect zip drive/floppy on HP-UX 9/10 +# drive a: file="/dev/rdsk/c201d5" exclusive partition=4 +# drive a: file="/dev/rdsk/c201d5s0" exclusive partition=4 +# drive a: file="/dev/rfloppy/c201d0s0" exclusive + +# A/UX target 5 on 1st scsi bus jaz or zip +# drive X: file="/dev/rdsk/c105d0s31" partition=4 + + +# Some examples for BeOS. +# floppy drive. hardcoded in devices.c, so no real need to define it here +#drive a: file="/dev/floppy_disk" exclusive +# ZIP drive on SCSI ID 6 +#drive z: file="/dev/scsi_disk_060" offset=16384 fat_bits=16 + +# SCO Unix 3.2v4 +# # Floppy disk drives +# +# drive a: file="/dev/install" exclusive +# drive b: file="/dev/install1" exclusive +# +# # SCSI hard disk partitions +# +# drive c: file="/dev/dsk/0sC" +# drive d: file="/dev/dsk/0sD" +# drive e: file="/dev/dsk/0sE" +# drive f: file="/dev/dsk/0sF" +# drive g: file="/dev/dsk/0sG" +# drive h: file="/dev/dsk/0sH" + +# # uncomment the following line to display all file names in lower +# # case by default +# mtools_lower_case=1 diff --git a/source/installer/sources/initrd/etc/networks b/source/installer/sources/initrd/etc/networks new file mode 100644 index 000000000..50d5162ee --- /dev/null +++ b/source/installer/sources/initrd/etc/networks @@ -0,0 +1,10 @@ +# +# networks This file describes a number of netname-to-address +# mappings for the TCP/IP subsystem. It is mostly +# used at boot time, when no name servers are running. +# + +loopback 127.0.0.0 +localnet 127.0.0.0 + +# End of networks. diff --git a/source/installer/sources/initrd/etc/nsswitch.conf b/source/installer/sources/initrd/etc/nsswitch.conf new file mode 100644 index 000000000..b21796bba --- /dev/null +++ b/source/installer/sources/initrd/etc/nsswitch.conf @@ -0,0 +1,42 @@ +# +# /etc/nsswitch.conf +# +# An example Name Service Switch config file. This file should be +# sorted with the most-used services at the beginning. +# +# The entry '[NOTFOUND=return]' means that the search for an +# entry should stop if the search in the previous entry turned +# up nothing. Note that if the search failed due to some other reason +# (like no NIS server responding) then the search continues with the +# next entry. +# +# Legal entries are: +# +# nisplus or nis+ Use NIS+ (NIS version 3) +# nis or yp Use NIS (NIS version 2), also called YP +# dns Use DNS (Domain Name Service) +# files Use the local files +# [NOTFOUND=return] Stop searching if not found so far +# + +passwd: files +shadow: files +group: files + +hosts: files dns + +services: [NOTFOUND=return] files +networks: [NOTFOUND=return] files +protocols: [NOTFOUND=return] files +rpc: [NOTFOUND=return] files +ethers: [NOTFOUND=return] files +netmasks: [NOTFOUND=return] files +bootparams: [NOTFOUND=return] files + +netgroup: + +publickey: + +automount: files +aliases: files + diff --git a/source/installer/sources/initrd/etc/passwd b/source/installer/sources/initrd/etc/passwd new file mode 100644 index 000000000..d89e1ba5f --- /dev/null +++ b/source/installer/sources/initrd/etc/passwd @@ -0,0 +1,21 @@ +root:x:0:0::/root:/bin/bash +bin:x:1:1:bin:/bin: +daemon:x:2:2:daemon:/sbin: +adm:x:3:4:adm:/var/log: +lp:x:4:7:lp:/var/spool/lpd: +sync:x:5:0:sync:/sbin:/bin/sync +shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown +halt:x:7:0:halt:/sbin:/sbin/halt +mail:x:8:12:mail:/: +news:x:9:13:news:/usr/lib/news: +uucp:x:10:14:uucp:/var/spool/uucppublic: +operator:x:11:0:operator:/root:/bin/bash +games:x:12:100:games:/usr/games: +ftp:x:14:50::/home/ftp: +smmsp:x:25:25:smmsp:/var/spool/clientmqueue: +mysql:x:27:27:MySQL:/var/lib/mysql:/bin/bash +rpc:x:32:32:RPC portmap user:/:/bin/false +sshd:x:33:33:sshd:/: +gdm:x:42:42:GDM:/var/state/gdm:/bin/bash +pop:x:90:90:POP:/: +nobody:x:99:99:nobody:/: diff --git a/source/installer/sources/initrd/etc/pcmcia/config.opts b/source/installer/sources/initrd/etc/pcmcia/config.opts new file mode 100644 index 000000000..5b8d5faf3 --- /dev/null +++ b/source/installer/sources/initrd/etc/pcmcia/config.opts @@ -0,0 +1,71 @@ +# +# Local PCMCIA Configuration File +# +#---------------------------------------------------------------------- +# +# System resources available for PCMCIA cards +# +# NOTE: these settings have no effect on resources assigned to a +# CardBus bridge device itself; this file only affects resources +# assigned to cards. Also, interrupt settings here will only affect +# ISA bus interrupts assigned to 16-bit cards. PCI interrupts +# generally can't be reconfigured. +# +# With the kernel PCMCIA subsystem, these settings also have no effect +# at all on resources used for 32-bit CardBus cards. Those are set by +# the PCI hotplug subsystem. +# + +# These are the official ports to use from pcmcia-cs: +#include port 0x100-0x4ff, port 0x800-0x8ff, port 0xc00-0xcff +# However, ports 0x810-0x81f hurt on some DELL machines and +# ports 0x3b0-0x3df hurt on some FSC machines, so we use this port +# list instead: +include port 0x100-0x3af, port 0x3e0-0x4ff, port 0xc00-0xcff + +include memory 0xc0000-0xfffff +include memory 0xa0000000-0xa0ffffff, memory 0x60000000-0x60ffffff + +# High port numbers do not always work... +# include port 0x1000-0x17ff + +# Extra port range for IBM Token Ring +include port 0xa00-0xaff + +# Resources we should not use, even if they appear to be available + +# First built-in serial port +exclude irq 4 +# Second built-in serial port +#exclude irq 3 +# First built-in parallel port +exclude irq 7 + +#---------------------------------------------------------------------- + +# Examples of options for loadable modules + +# To fix sluggish network with IBM ethernet adapter... +#module "pcnet_cs" opts "mem_speed=600" + +# Options for IBM Token Ring adapters +#module "ibmtr_cs" opts "mmiobase=0xd0000 srambase=0xd4000" + +# Options for Raylink/WebGear driver: uncomment only one line... +# These are the default settings for use with the WebGear Windows driver: +#module "ray_cs" opts "essid=NETWORK_NAME hop_dwell=128 beacon_period=256 translate=0" +# Generic ad-hoc network +#module "ray_cs" opts "essid=ADHOC_ESSID hop_dwell=128 beacon_period=256 translate=1" +# Infrastructure network for older cards +#module "ray_cs" opts "net_type=1 essid=ESSID1" +# Infrastructure network for WebGear +#module "ray_cs" opts "net_type=1 essid=ESSID1 translate=1 hop_dwell=128 beacon_period=256" + +# Options for WaveLAN/IEEE driver (AccessPoint mode)... +#module "wvlan_cs" opts "station_name=MY_PC" +# Options for WaveLAN/IEEE driver (ad-hoc mode)... +#module "wvlan_cs" opts "port_type=3 channel=1 station_name=MY_PC" + +# Options for Xircom Netwave driver... +#module "netwave_cs" opts "domain=0x100 scramble_key=0x0" + diff --git a/source/installer/sources/initrd/etc/profile b/source/installer/sources/initrd/etc/profile new file mode 100644 index 000000000..c728b165b --- /dev/null +++ b/source/installer/sources/initrd/etc/profile @@ -0,0 +1,35 @@ +# commands common to all logins +PATH="$PATH:/bin:/sbin:/usr/bin:/usr/lib/setup" +PATH="$PATH:/mnt/usr/local/bin:/mnt/usr/bin:/mnt/bin" +PATH="$PATH:/mnt/usr/local/sbin:/mnt/usr/sbin:/mnt/sbin" +PATH="$PATH:/mnt/linux/usr/local/bin:/mnt/linux/usr/bin:/mnt/linux/bin" +PATH="$PATH:/mnt/linux/usr/local/sbin:/mnt/linux/usr/sbin:/mnt/linux/sbin" + +# Allow a user to set the default TERM entry by specifying TERM=<name> +# as a kernel command line parameter: +if cat /proc/cmdline | grep "TERM=[a-zA-Z0-9]" 1> /dev/null 2> /dev/null ; then + export TERM=$( sed 's/.*TERM=\([^ ]*\).*/\1/' < /proc/cmdline ) +elif cat /proc/cmdline | grep console=ttyS 1> /dev/null 2> /dev/null ; then + export TERM=vt100 +else + export TERM=linux +fi +HOME=/root +LESS=-MM + +# Set command line prompt: +PS1='\u@\h:\w# ' +PS2='> ' + +ignoreeof=10 +export HOME PATH DISPLAY LESS TERM PS1 PS2 ignoreeof +umask 022 + +# Append any additional sh scripts found in /etc/profile.d/: +for profile_script in /etc/profile.d/*.sh ; do + if [ -x $profile_script ]; then + . $profile_script + fi +done +unset profile_script + diff --git a/source/installer/sources/initrd/etc/profile.d/coreutils-dircolors.sh b/source/installer/sources/initrd/etc/profile.d/coreutils-dircolors.sh new file mode 100755 index 000000000..57670d6ef --- /dev/null +++ b/source/installer/sources/initrd/etc/profile.d/coreutils-dircolors.sh @@ -0,0 +1,55 @@ +# Slackware color ls profile script for /bin/sh-like shells. + +# Set up LS_OPTIONS environment variable. +# This contains extra command line options to use with ls. +# The default ones are: +# -F = show '/' for dirs, '*' for executables, etc. +# -T 0 = don't trust tab spacing when formatting ls output. +# -b = better support for special characters +OPTIONS="-F -b -T 0" + +# COLOR needs one of these arguments: +# 'auto' colorizes output to ttys, but not pipes. +# 'always' adds color characters to all output. +# 'never' shuts colorization off. +COLOR=auto + +# This section shouldn't require any user adjustment since it is +# simply setting the LS_OPTIONS variable using the information +# already given above: +LS_OPTIONS=" $OPTIONS --color=$COLOR "; +export LS_OPTIONS; +unset COLOR +unset OPTIONS + +# Set up aliases to use color ls by default. A few additional +# aliases like 'dir', 'vdir', etc, are some ancient artifacts +# from 1992 or so... possibly they should be disabled, but maybe +# someone out there is actually using them? :-) +# Assume shell aliases are supported. Ash is going to freak out +# when it sees zsh syntax anyway, so whatever. +alias ls='/bin/ls $LS_OPTIONS'; +alias dir='/bin/ls $LS_OPTIONS --format=vertical'; +alias vdir='/bin/ls $LS_OPTIONS --format=long'; +alias d=dir; +alias v=vdir; + +# Just for fun, here are the old sh/ash style shell functions. +# this script isn't currently working with ash (and makes some noisy +# error messages), but perhaps these will still be of use to +# someone... +#ls () { /bin/ls $LS_OPTIONS "$@" ; }; +#dir () { /bin/ls $LS_OPTIONS --format=vertical "$@" ; }; +#vdir () { /bin/ls $LS_OPTIONS --format=long "$@" ; }; +#d () { dir "$@" ; }; +#v () { vdir "$@" ; }; + +# Set up the LS_COLORS environment: +if [ -f $HOME/.dir_colors ]; then + eval `/bin/dircolors -b $HOME/.dir_colors` +elif [ -f /etc/DIR_COLORS ]; then + eval `/bin/dircolors -b /etc/DIR_COLORS` +else + eval `/bin/dircolors -b` +fi + diff --git a/source/installer/sources/initrd/etc/profile.d/glibc.sh b/source/installer/sources/initrd/etc/profile.d/glibc.sh new file mode 100755 index 000000000..979f4879e --- /dev/null +++ b/source/installer/sources/initrd/etc/profile.d/glibc.sh @@ -0,0 +1,8 @@ +#!/bin/sh +# Set more relaxed (glibc-2.3.5 like) malloc() checking. +# +# This relaxes the default paranoia level so that it reports +# bugs, but does not kill the questionable process. You can +# get away with running broken programs with this setting, +# but at a possible performance and security cost. +#export MALLOC_CHECK_=1 diff --git a/source/installer/sources/initrd/etc/protocols b/source/installer/sources/initrd/etc/protocols new file mode 100644 index 000000000..db3254c97 --- /dev/null +++ b/source/installer/sources/initrd/etc/protocols @@ -0,0 +1,146 @@ +# +# Internet protocols +# +# $FreeBSD: src/etc/protocols,v 1.16 2002/02/10 08:19:58 dd Exp $ +# from: @(#)protocols 5.1 (Berkeley) 4/17/89 +# +# See also http://www.iana.org/assignments/protocol-numbers +# +ip 0 IP # internet protocol, pseudo protocol number +#hopopt 0 HOPOPT # hop-by-hop options for ipv6 +icmp 1 ICMP # internet control message protocol +igmp 2 IGMP # internet group management protocol +ggp 3 GGP # gateway-gateway protocol +ipencap 4 IP-ENCAP # IP encapsulated in IP (officially ``IP'') +st2 5 ST2 # ST2 datagram mode (RFC 1819) +tcp 6 TCP # transmission control protocol +cbt 7 CBT # CBT, Tony Ballardie <A.Ballardie@cs.ucl.ac.uk> +egp 8 EGP # exterior gateway protocol +igp 9 IGP # any private interior gateway (Cisco: for IGRP) +bbn-rcc 10 BBN-RCC-MON # BBN RCC Monitoring +nvp 11 NVP-II # Network Voice Protocol +pup 12 PUP # PARC universal packet protocol +argus 13 ARGUS # ARGUS +emcon 14 EMCON # EMCON +xnet 15 XNET # Cross Net Debugger +chaos 16 CHAOS # Chaos +udp 17 UDP # user datagram protocol +mux 18 MUX # Multiplexing protocol +dcn 19 DCN-MEAS # DCN Measurement Subsystems +hmp 20 HMP # host monitoring protocol +prm 21 PRM # packet radio measurement protocol +xns-idp 22 XNS-IDP # Xerox NS IDP +trunk-1 23 TRUNK-1 # Trunk-1 +trunk-2 24 TRUNK-2 # Trunk-2 +leaf-1 25 LEAF-1 # Leaf-1 +leaf-2 26 LEAF-2 # Leaf-2 +rdp 27 RDP # "reliable datagram" protocol +irtp 28 IRTP # Internet Reliable Transaction Protocol +iso-tp4 29 ISO-TP4 # ISO Transport Protocol Class 4 +netblt 30 NETBLT # Bulk Data Transfer Protocol +mfe-nsp 31 MFE-NSP # MFE Network Services Protocol +merit-inp 32 MERIT-INP # MERIT Internodal Protocol +sep 33 SEP # Sequential Exchange Protocol +3pc 34 3PC # Third Party Connect Protocol +idpr 35 IDPR # Inter-Domain Policy Routing Protocol +xtp 36 XTP # Xpress Tranfer Protocol +ddp 37 DDP # Datagram Delivery Protocol +idpr-cmtp 38 IDPR-CMTP # IDPR Control Message Transport Proto +tp++ 39 TP++ # TP++ Transport Protocol +il 40 IL # IL Transport Protocol +ipv6 41 IPV6 # ipv6 +sdrp 42 SDRP # Source Demand Routing Protocol +ipv6-route 43 IPV6-ROUTE # routing header for ipv6 +ipv6-frag 44 IPV6-FRAG # fragment header for ipv6 +idrp 45 IDRP # Inter-Domain Routing Protocol +rsvp 46 RSVP # Resource ReSerVation Protocol +gre 47 GRE # Generic Routing Encapsulation +mhrp 48 MHRP # Mobile Host Routing Protocol +bna 49 BNA # BNA +esp 50 ESP # encapsulating security payload +ah 51 AH # authentication header +i-nlsp 52 I-NLSP # Integrated Net Layer Security TUBA +swipe 53 SWIPE # IP with Encryption +narp 54 NARP # NBMA Address Resolution Protocol +mobile 55 MOBILE # IP Mobility +tlsp 56 TLSP # Transport Layer Security Protocol +skip 57 SKIP # SKIP +ipv6-icmp 58 IPV6-ICMP # ICMP for IPv6 +ipv6-nonxt 59 IPV6-NONXT # no next header for ipv6 +ipv6-opts 60 IPV6-OPTS # destination options for ipv6 +# 61 # any host internal protocol +cftp 62 CFTP # CFTP +# 63 # any local network +sat-expak 64 SAT-EXPAK # SATNET and Backroom EXPAK +kryptolan 65 KRYPTOLAN # Kryptolan +rvd 66 RVD # MIT Remote Virtual Disk Protocol +ippc 67 IPPC # Internet Pluribus Packet Core +# 68 # any distributed file system +sat-mon 69 SAT-MON # SATNET Monitoring +visa 70 VISA # VISA Protocol +ipcv 71 IPCV # Internet Packet Core Utility +cpnx 72 CPNX # Computer Protocol Network Executive +cphb 73 CPHB # Computer Protocol Heart Beat +wsn 74 WSN # Wang Span Network +pvp 75 PVP # Packet Video Protocol +br-sat-mon 76 BR-SAT-MON # Backroom SATNET Monitoring +sun-nd 77 SUN-ND # SUN ND PROTOCOL-Temporary +wb-mon 78 WB-MON # WIDEBAND Monitoring +wb-expak 79 WB-EXPAK # WIDEBAND EXPAK +iso-ip 80 ISO-IP # ISO Internet Protocol +vmtp 81 VMTP # Versatile Message Transport +secure-vmtp 82 SECURE-VMTP # SECURE-VMTP +vines 83 VINES # VINES +ttp 84 TTP # TTP +nsfnet-igp 85 NSFNET-IGP # NSFNET-IGP +dgp 86 DGP # Dissimilar Gateway Protocol +tcf 87 TCF # TCF +eigrp 88 EIGRP # Enhanced Interior Routing Protocol (Cisco) +ospf 89 OSPFIGP # Open Shortest Path First IGP +sprite-rpc 90 Sprite-RPC # Sprite RPC Protocol +larp 91 LARP # Locus Address Resolution Protocol +mtp 92 MTP # Multicast Transport Protocol +ax.25 93 AX.25 # AX.25 Frames +ipip 94 IPIP # Yet Another IP encapsulation +micp 95 MICP # Mobile Internetworking Control Pro. +scc-sp 96 SCC-SP # Semaphore Communications Sec. Pro. +etherip 97 ETHERIP # Ethernet-within-IP Encapsulation +encap 98 ENCAP # Yet Another IP encapsulation +# 99 # any private encryption scheme +gmtp 100 GMTP # GMTP +ifmp 101 IFMP # Ipsilon Flow Management Protocol +pnni 102 PNNI # PNNI over IP +pim 103 PIM # Protocol Independent Multicast +aris 104 ARIS # ARIS +scps 105 SCPS # SCPS +qnx 106 QNX # QNX +a/n 107 A/N # Active Networks +ipcomp 108 IPComp # IP Payload Compression Protocol +snp 109 SNP # Sitara Networks Protocol +compaq-peer 110 Compaq-Peer # Compaq Peer Protocol +ipx-in-ip 111 IPX-in-IP # IPX in IP +vrrp 112 VRRP # Virtual Router Redundancy Protocol +pgm 113 PGM # PGM Reliable Transport Protocol +# 114 # any 0-hop protocol +l2tp 115 L2TP # Layer Two Tunneling Protocol +ddx 116 DDX # D-II Data Exchange +iatp 117 IATP # Interactive Agent Transfer Protocol +st 118 ST # Schedule Transfer +srp 119 SRP # SpectraLink Radio Protocol +uti 120 UTI # UTI +smp 121 SMP # Simple Message Protocol +sm 122 SM # SM +ptp 123 PTP # Performance Transparency Protocol +isis 124 ISIS # ISIS over IPv4 +fire 125 FIRE +crtp 126 CRTP # Combat Radio Transport Protocol +crudp 127 CRUDP # Combat Radio User Datagram +sscopmce 128 SSCOPMCE +iplt 129 IPLT +sps 130 SPS # Secure Packet Shield +pipe 131 PIPE # Private IP Encapsulation within IP +sctp 132 SCTP # Stream Control Transmission Protocol +fc 133 FC # Fibre Channel +# 134-254 # Unassigned +divert 254 DIVERT # Divert pseudo-protocol [non IANA] +# 255 # Reserved diff --git a/source/installer/sources/initrd/etc/rc.d/rc.S b/source/installer/sources/initrd/etc/rc.d/rc.S new file mode 100755 index 000000000..38317b4df --- /dev/null +++ b/source/installer/sources/initrd/etc/rc.d/rc.S @@ -0,0 +1,250 @@ +#!/bin/sh +# rc.S: Basic system initialization. + +# Any /etc/mtab that exists here is old, so we start with a new one: +/bin/rm -f /etc/mtab{,~,.tmp} && /bin/touch /etc/mtab + +# Add (fake) entry for / to /etc/mtab: +/sbin/mount -f -w /dev/initramfs / -t tmpfs 1> /dev/null + +# Mount /proc: +/sbin/mount -v proc /proc -t proc 1> /dev/null + +# Mount sysfs next: +/sbin/mount -v sysfs /sys -t sysfs 1> /dev/null + +# Activate swap: +/sbin/swapon -a 1> /dev/null + +if [ -x /sbin/ldconfig ]; then + /sbin/ldconfig 1> /dev/null +fi + +## Detect serial console from kernel command line: +#if cat /proc/cmdline | grep console=ttyS 1> /dev/null 2> /dev/null ; then +# SERIAL_CONSOLE="true" +#fi + +# System logger (mostly to eat annoying messages): +/sbin/syslogd 2> /dev/null +sleep 1 +/sbin/klogd -c 3 1> /dev/null + +# Try to load the loop module: +modprobe loop 1> /dev/null 2> /dev/null + +# Run udev: +if ! grep -wq noudev /proc/cmdline ; then + /bin/bash /etc/rc.d/rc.udev start + + # Re-assemble RAID volumes: + /sbin/mdadm -E -s > /etc/mdadm.conf + /sbin/mdadm -S -s + /sbin/mdadm -A -s + # This seems to make the kernel see partitions more reliably: + fdisk -l /dev/md* 1> /dev/null 2> /dev/null +else + # Run our old detection routines: + + # Look for USB keyboard or storage: + /etc/rc.d/rc.usb start + sleep 3 + + # Look for IEEE1394 devices: + if grep 1394 /proc/pci 1> /dev/null 2> /dev/null ; then + /etc/rc.d/rc.ieee1394 start + #sleep 3 + fi + + # Load additional install floppies: + for NEWDISK in 2 ; do + if [ ! -r /etc/disk${NEWDISK} ]; then + while [ 0 ]; do + echo + echo -n "Insert install.${NEWDISK} floppy disk to be loaded into RAM disk and press ENTER" + read readfoo; + if [ "$readfoo" = "Q" -o "$readfoo" = "q" ]; then + break; + fi + echo -n "Loading install.${NEWDISK} floppy into RAM disk... " + ( cd / ; cat /dev/fd0 | zcat 2> /dev/null | tar xf - ) + if [ -r /etc/disk${NEWDISK} ]; then + echo "done." + echo + break; + else + echo "Error. (reload or enter Q)" + echo + continue; + fi + done + fi + done + + ### PROBABLY USELESS WITHOUT SOME TIMED DELAY ABOVE + ## Start USB again (in case we missed a USB keyboard) + #/etc/rc.d/rc.usb start + + # Make detected partitions: + /dev/makedevs.sh + + ## Not needed with CONFIG_SCSI_MULTI_LUN=y + #unset SCAN + ## Now we should rescan the "SCSI" bus to look for new USB or firewire devices + ## that look like SCSI devices: + #if [ -r /proc/bus/usb/devices ]; then + # if cat /proc/bus/usb/devices | grep -w usb-storage 1> /dev/null 2> /dev/null ; then + # SCAN="true" + # fi + #fi + #if [ -r /proc/bus/ieee1394/devices ]; then + # if cat /proc/bus/ieee1394/devices | grep -w SBP2 1> /dev/null 2> /dev/null ; then + # SCAN="true" + # fi + #fi + #if [ "$SCAN" = "true" ]; then + # if ! cat /proc/cmdline | grep -q noscanluns 2> /dev/null ; then + # echo "Detected new USB/IEEE1394 storage devices... scanning all LUNs." + # echo "(to skip, give a 'noscanluns' kernel option at boot)" + # #sleep 5 + # sh /sbin/rescan-scsi-bus -l + # #sleep 1 + # fi + #fi + #unset SCAN + + # Re-assemble RAID volumes: + /sbin/mdadm -E -s > /etc/mdadm.conf + /sbin/mdadm -S -s + /sbin/mdadm -A -s + # This seems to make the kernel see partitions more reliably: + fdisk -l /dev/md* 1> /dev/null 2> /dev/null + + # Check /proc/partitions again: + /dev/makedevs.sh + + # Create LVM nodes: + /dev/devmap_mknod.sh + +fi # End Run udev: + +# Here's the situation. Because of the practice of keeping the local +# time (rather than UTC) in the system's clock, at any given time half +# of the people doing an install will be creating files that upon +# reboot will appear to have been created in the future. +# +# There are a lot of things that aren't happy when that happens. The +# one that screams the most loudly is e2fsck, and we don't want to +# anger that! Sometimes it even proceeds to check the partitions just +# to be sure the user is fully punished. +# +# But, there's a simple solution. If we set the (temporary) Linux clock +# to yesterday (-24h), then there's no way that could occur. Everything +# on the system will be in the past (but not too far in the past). +# Since files will quickly be put into use and given the correct after +# reboot, this really shouldn't have a negative impact. Plus, it affects +# only newly created files during installation -- any file shipped in a +# package will have an accurate time of creation. (for its timezone ;-) +# +# Update: We have to use 2 days ago, or chroot()+timezone offset might +# still be in the future... <sigh> +# +touch /.today +/bin/sh /sbin/fakedate + +if [ -x /etc/rc.d/rc.inet1 ]; then + /bin/sh /etc/rc.d/rc.inet1 +fi + +# pcmciautils is installing rc.pcmcia as chmod 644, so we'll change that. +# It won't be run at boot time, but it'll make it easy for the pcmcia script +# or to run it from the command line. +chmod 755 /etc/rc.d/rc.pcmcia + +# Scan for existing LVM partitions: +# We will run 'vgscan -ay' in the setup to prevent a 10 second sleep; +vgscan --mknodes 2> /tmp/foo +cat /tmp/foo | uniq +rm -f /tmp/foo + +if [ -x /etc/rc.d/rc.font ]; then + /bin/sh /etc/rc.d/rc.font +fi + +# Don't automatically blank the screen, or it will go black during the install +# process when stray keystrokes might be dangerous: +/bin/setterm -blank 0 + +echo > /etc/motd +echo "`/bin/uname -a | /bin/cut -d\ -f1,3`." >> /etc/motd +echo >> /etc/motd +cat << EOF >> /etc/motd +If you're upgrading an existing Slackware system, you might want to +remove old packages before you run 'setup' to install the new ones. If +you don't, your system will still work but there might be some old files +left laying around on your drive. + +Just mount your Linux partitions under /mnt and type 'pkgtool'. If you +don't know how to mount your partitions, type 'pkgtool' and it will tell +you how it's done. + +To partition your hard drive(s), use 'cfdisk' or 'fdisk'. +To start the main installation (after partitioning), type 'setup'. + +EOF + +# Dropbear seems to handle the $PATH correctly now... +#echo > /etc/motd.net +#echo "First command to run is 'source /etc/profile'." >> /etc/motd.net +#echo "This will setup the PATH for you." >> /etc/motd.net +#echo >> /etc/motd.net + +# If possible, figure out what kernel we just booted with: +unset SLACK_KERNEL +for ARG in `cat /proc/cmdline` ; do + if [ "`echo $ARG | cut -f 1 -d =`" = "SLACK_KERNEL" ]; then + IMAGE="`echo $ARG | cut -f 2 -d =`" + SLACK_KERNEL=$IMAGE + fi +done +export SLACK_KERNEL + +. /etc/profile + +clear +if ! cat /proc/cmdline | grep -q 'kbd=' 2> /dev/null ; then + echo + echo + echo "<OPTION TO LOAD SUPPORT FOR NON-US KEYBOARD>" + echo + echo "If you are not using a US keyboard, you may now load a different" + echo "keyboard map. To select a different keyboard map, please enter 1" + echo "now. To continue using the US map, just hit enter." + echo + echo -n "Enter 1 to select a keyboard map: " + read ONE + if [ "$ONE" = "1" ]; then + /usr/lib/setup/SeTkeymap + fi +else + for ARG in `cat /proc/cmdline` ; do + if [ "`echo $ARG | cut -f1 -d=`" = "kbd" ]; then + BMAP="`echo $ARG | cut -f2 -d=`.bmap" + fi + done + tar xzOf /etc/keymaps.tar.gz $BMAP | loadkmap + unset BMAP +fi +clear + +# Provision for unattended network configuration: +/usr/lib/setup/SeTnet boot +# Start dropbear ssh server (only if a configured interface is present): +/etc/rc.d/rc.dropbear start + +# Fake login: (fooled ya! ;^) + +cat /etc/issue +echo -n "slackware login: " +read BOGUS_LOGIN +cat /etc/motd diff --git a/source/installer/sources/initrd/etc/rc.d/rc.dropbear b/source/installer/sources/initrd/etc/rc.d/rc.dropbear new file mode 100755 index 000000000..a9ed47fd5 --- /dev/null +++ b/source/installer/sources/initrd/etc/rc.d/rc.dropbear @@ -0,0 +1,58 @@ +#!/bin/sh +# Start/stop/restart the dropbear secure shell server: + +# Terminate the script now if we have no interface with an IP address: +if ! `ip -f inet -o addr show | grep -v " lo " 1>/dev/null 2>/dev/null` ; then + exit 1 +fi + +dropbear_start() { + # Create host keys if needed. + if [ ! -f /etc/dropbear/dropbear_rsa_host_key ]; then + /bin/dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key + fi + if [ ! -f /etc/dropbear/dropbear_dss_host_key ]; then + /bin/dropbearkey -t dss -f /etc/dropbear/dropbear_dss_host_key + fi + touch /var/log/lastlog # The file is missing in the installer + /sbin/dropbear 2>> /var/log/dropbear.log +} + +dropbear_stop() { + killall dropbear +} + +dropbear_restart() { + if [ -r /var/run/dropbear.pid ]; then + echo "WARNING: killing listener process only. To kill every dropbear process, you " + echo " must use 'rc.dropbear stop'. 'rc.dropbear restart' kills only the " + echo " parent dropbear to allow an admin logged in through dropbear to use " + echo " 'rc.dropbear restart' without being cut off. If dropbear has been " + echo " upgraded, new connections will now use the new version, which should " + echo " be a safe enough approach." + kill `cat /var/run/dropbear.pid` + else + echo "WARNING: There does not appear to be a parent instance of dropbear running." + echo " If you really want to kill all running instances of dropbear " + echo " (including any sessions currently in use), run " + echo " '/etc/rc.d/rc.dropbear stop' instead." + exit 1 + fi + sleep 1 + dropbear_start +} + +case "$1" in +'start') + dropbear_start + ;; +'stop') + dropbear_stop + ;; +'restart') + dropbear_restart + ;; +*) + echo "usage $0 start|stop|restart" +esac + diff --git a/source/installer/sources/initrd/etc/rc.d/rc.font b/source/installer/sources/initrd/etc/rc.d/rc.font new file mode 100755 index 000000000..69e69baaa --- /dev/null +++ b/source/installer/sources/initrd/etc/rc.d/rc.font @@ -0,0 +1,45 @@ +#!/bin/sh +# Load terminus font. This is either to resize the terminal to be close to default, +# or to simply load a better looking font for the installer. + +# In case udev has not yet prepared the tty devices, create them: +create_tty() { + if [ ! -r /dev/tty1 ]; then + mknod /dev/tty1 c 4 1 + chown root:tty /dev/tty1 + chmod 620 /dev/tty1 + fi + if [ ! -r /dev/tty2 ]; then + mknod /dev/tty2 c 4 2 + chown root:tty /dev/tty2 + chmod 620 /dev/tty2 + fi + if [ ! -r /dev/tty3 ]; then + mknod /dev/tty3 c 4 3 + chown root:tty /dev/tty3 + chmod 620 /dev/tty3 + fi + if [ ! -r /dev/tty4 ]; then + mknod /dev/tty4 c 4 4 + chown root:tty /dev/tty4 + chmod 620 /dev/tty4 + fi +} + +if ! grep -wq nofont /proc/cmdline ; then + if [ ! "$(cat /proc/fb)" = "" ] ; then + if [ -r /usr/share/kbd/consolefonts/ter-120b.psf.gz ]; then + create_tty + for tty in /dev/tty{1,2,3,4} ; do + setfont -C $tty /usr/share/kbd/consolefonts/ter-120b.psf.gz + done + fi + else + if [ -r /usr/share/kbd/consolefonts/ter-c14v.psf.gz ]; then + create_tty + for tty in /dev/tty{1,2,3,4} ; do + setfont -C $tty /usr/share/kbd/consolefonts/ter-c14v.psf.gz + done + fi + fi +fi diff --git a/source/installer/sources/initrd/etc/rc.d/rc.ieee1394 b/source/installer/sources/initrd/etc/rc.d/rc.ieee1394 new file mode 100755 index 000000000..2701229dc --- /dev/null +++ b/source/installer/sources/initrd/etc/rc.d/rc.ieee1394 @@ -0,0 +1,48 @@ +#!/bin/sh +# rc.ieee1394: search for IEEE1394 (firewire) devices needed for installation. + +# This is a function to unload the IEEE1394 (firewire) modules: +ieee1394_stop() { + modprobe -r sbp2 ohci1394 + modprobe -r ieee1394 +} + +# This is a function to attempt to enable a IEEE1394 storage device. +# If this causes problems for you, use "noieee1394" as a kernel +# command line option at boot time. +ieee1394_start() { + # If noieee1394 was given at boot, skip. + if ! cat /proc/cmdline | grep noieee1394 1> /dev/null 2> /dev/null ; then + # If there aren't even any modules for this kernel, skip. + if [ -d /lib/modules/`uname -r` ]; then + # If ieee1394 is already loaded, skip. + if ! grep ieee1394 /proc/modules 1> /dev/null 2> /dev/null ; then + echo "Probing for IEEE1394 (Firewire) controllers." + echo "(to skip, give a 'noieee1394' kernel option at boot)" + #sleep 5 + modprobe -q ieee1394 >/dev/null 2>&1 + # Try to load hub module: + modprobe -q ohci1394 >/dev/null 2>&1 + # Attempt to load storage support. + modprobe -q sbp2 >/dev/null 2>&1 + fi + fi + fi +} + +case "$1" in +'start') + ieee1394_start + ;; +'stop') + ieee1394_stop + ;; +'restart') + ieee1394_stop + sleep 5 + ieee1394_start + ;; +*) + echo "usage $0 start|stop|restart" +esac + diff --git a/source/installer/sources/initrd/etc/rc.d/rc.inet1 b/source/installer/sources/initrd/etc/rc.d/rc.inet1 new file mode 100755 index 000000000..370de0061 --- /dev/null +++ b/source/installer/sources/initrd/etc/rc.d/rc.inet1 @@ -0,0 +1,28 @@ +#! /bin/sh +# +# rc.inet1 This shell script boots up the base INET system. +# +# Version: @(#)/etc/rc.d/rc.inet1 1.01 05/27/93 +# + +TMP=/var/log/setup/tmp +mkdir -p $TMP/dhcpc + +HOSTNAME=`cat /etc/HOSTNAME` +/bin/hostname `cat /etc/HOSTNAME | cut -f1 -d .` + +# Attach the loopback device. +/sbin/ifconfig lo 127.0.0.1 +/sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo + +# In case we use udev - +# Try to get information from a local DHCP server and store that for later: +if ! grep -wq nodhcp /proc/cmdline ; then + for EDEV in $(cat /proc/net/dev | grep ':' | sed -e "s/^ *//" | cut -f1 -d: | grep -v lo) ; do + if grep -q $(echo ${EDEV}: | cut -f 1 -d :): /proc/net/wireless ; then + continue # skip wireless interfaces + fi + /sbin/dhcpcd -t 35 -L -T $EDEV 1>/etc/dhcpc/dhcpcd-${EDEV}.info 2>/dev/null & + done +fi + diff --git a/source/installer/sources/initrd/etc/rc.d/rc.pcmcia b/source/installer/sources/initrd/etc/rc.d/rc.pcmcia new file mode 100755 index 000000000..1f21be84e --- /dev/null +++ b/source/installer/sources/initrd/etc/rc.d/rc.pcmcia @@ -0,0 +1,65 @@ +#!/bin/sh +# +# rc.pcmcia: Script to initialize PCMCIA subsystem. +# Based in an example found in cardmgr-to-pcmciautils.txt +# and in Slackware rc.pcmcia found in pcmcia-cs package. +# + +# Set this to the driver to use, one of: +# probe, yenta_socket, i82365, i82092, pd6729, tcic, etc. +# +DRIVER=probe +DRIVER_OPTS= + +case "$1" in + start) + echo "Starting PCMCIA services:" + fgrep -q pcmcia /proc/devices + if [ $? -ne 0 ] ; then + if [ "$DRIVER" = "probe" ]; then + echo " <Probing for PCIC: edit /etc/rc.d/rc.pcmcia>" + for DRV in yenta_socket i82365 tcic ; do + /sbin/modprobe $DRV > /dev/null 2>&1 + /sbin/pccardctl status | grep -q Socket && break + /sbin/modprobe -r $DRV > /dev/null 2>&1 + done + else + echo " <Loading PCIC: $DRIVER>" + /sbin/modprobe $DRIVER $DRIVER_OPTS > /dev/null 2>&1 + fi + /sbin/modprobe pcmcia > /dev/null 2>&1 # just in case it's not auto-loaded + else + echo " <PCIC already loaded>" + fi + ;; + + stop) + echo -n "Shutting down PCMCIA services: " + echo -n "cards " + /sbin/pccardctl eject + MODULES=`/sbin/lsmod | grep "pcmcia " | awk '{print $4}' | tr , ' '` + for i in $MODULES ; do + echo -n "$i " + /sbin/modprobe -r $i > /dev/null 2>&1 + done + echo -n "pcmcia " + /sbin/modprobe -r pcmcia > /dev/null 2>&1 + if [ "$DRIVER" = "probe" ]; then + for DRV in yenta_socket i82365 tcic ; do + grep -qw $DRV /proc/modules && modprobe -r $DRV && \ + echo -n "$DRV " && break + done + else + /sbin/modprobe -r $DRIVER > /dev/null 2>&1 + fi + echo -n "rsrc_nonstatic " + /sbin/modprobe -r rsrc_nonstatic > /dev/null 2>&1 + echo "pcmcia_core" + /sbin/modprobe -r pcmcia_core > /dev/null 2>&1 + ;; + + restart) + $0 stop + $0 start + ;; +esac diff --git a/source/installer/sources/initrd/etc/rc.d/rc.udev b/source/installer/sources/initrd/etc/rc.d/rc.udev new file mode 100755 index 000000000..8c238b0dd --- /dev/null +++ b/source/installer/sources/initrd/etc/rc.d/rc.udev @@ -0,0 +1,133 @@ +#!/bin/sh +# This is a script to initialize udev, which populates the /dev +# directory with device nodes, scans for devices, loads the +# appropriate kernel modules, and configures the devices. + +PATH="/sbin:/bin" +OPT="" + +. /etc/udev/udev.conf + +# remove trailing slash from udev_root +UDEV_ROOT=$(echo "${udev_root}" |sed 's/\/*$//') + +case "$1" in + start) + # Sanity check #1, udev requires that the kernel support tmpfs: + if ! grep -wq tmpfs /proc/filesystems ; then + echo "Sorry, but you need tmpfs support in the kernel to use udev." + echo + echo "FATAL: Refusing to run /etc/rc.d/rc.udev." + exit 1 + fi + + # Sanity check #2, make sure that a 2.6.x kernel is new enough: + if [ "$(uname -r | cut -f 1,2 -d .)" = "2.6" ]; then + if [ "$(uname -r | cut -f 3 -d . | sed 's/[^[:digit:]].*//')" -lt "15" ]; then + echo "Sorry, but you need a 2.6.15+ kernel to use udev." + echo "Your kernel version is only $(uname -r)." + echo + echo "FATAL: Refusing to run /etc/rc.d/rc.udev." + exit 1 + fi + fi + + # Sanity check #3, make sure the udev package was not removed. If udevd + # is not there, this will also shut off this script to prevent further + # problems: + if [ ! -x /sbin/udevd ]; then + chmod 644 /etc/rc.d/rc.udev + echo "No udevd daemon found." + echo "Turning off udev: chmod 644 /etc/rc.d/rc.udev" + echo "FATAL: Refusing to run /etc/rc.d/rc.udev." + exit 1 + fi + + # Disable hotplug helper since udevd listens to netlink: + if [ -e /proc/sys/kernel/hotplug ]; then + echo "" > /proc/sys/kernel/hotplug + fi + + # if udevd is already running, rc.udev start will try to re-run + # failed events. Else, it will start udevd. + if ps axc | grep -q udevd ; then + OPT="--type=failed $OPT" + ( cd ${UDEV_ROOT}/.udev + for TMPFILE in tmp-rules-*.rules ; do + mv $TMPFILE /etc/udev/rules.d/${TMPFILE/tmp-rules--/} 2>/dev/null + done + ) + else + # Mount tmpfs on $UDEV_ROOT: + if ! grep -E -q "^[^[:space:]]+ $UDEV_ROOT tmpfs" /proc/mounts; then + # umount shm if needed + if grep -E -q "^[^[:space:]]+ $UDEV_ROOT/shm tmpfs" /proc/mounts; then + umount -l $UDEV_ROOT/shm + fi + + # Umount pts if needed, we will remount it later: + if grep -E -q "^[^[:space:]]+ $UDEV_ROOT/pts devpts" /proc/mounts; then + umount -l $UDEV_ROOT/pts + fi + + # Mount tmpfs on $UDEV_ROOT: + # the -n is because we don't want $UDEV_ROOT umounted when + # someone (rc.[06]) calls umount -a + mount -n -o mode=0755 -t tmpfs tmpfs $UDEV_ROOT + + # Remount pts: + mkdir $UDEV_ROOT/pts 2> /dev/null + mount -n -o mode=0620,gid=5 -t devpts devpts $UDEV_ROOT/pts + fi + + # Add the static nodes to $UDEV_ROOT: + cp --preserve=all --recursive --remove-destination /lib/udev/devices/* $UDEV_ROOT + + # Start udevd: + echo "Starting udevd: /sbin/udevd --daemon" + /sbin/udevd --daemon + + # Create rootdev rules + DEVICENUMBER=$( /bin/stat -c %d / ) + MAJORNUMBER=$(($DEVICENUMBER / 256)) + MINORNUMBER=$(($DEVICENUMBER % 256)) + + echo 'ACTION=="add|change", SUBSYSTEM=="block", ENV{MAJOR}=="'$MAJORNUMBER'", ENV{MINOR}=="'$MINORNUMBER'", SYMLINK+="root"' > /dev/.udev/rules.d/61-dev-root-link.rules + + fi + + echo "Triggering udev events: /sbin/udevadm trigger $OPT" + # Call udevtrigger and udevsettle to do the device configuration: + /sbin/udevadm trigger $OPT && /sbin/udevadm settle --timeout=120 + + ;; + stop) + echo "Stopping udevd" + if [ -e /proc/sys/kernel/hotplug ]; then + echo /sbin/hotplug > /proc/sys/kernel/hotplug + fi + killall udevd + ;; + restart) + echo "Restarting udevd" + killall udevd + sleep 5 + udevd --daemon + ;; + reload) + echo "Reloading udev rules" + udevadm control --reload-rules + cp --preserve=all --recursive --update /lib/udev/devices/* $UDEV_ROOT + ;; + force-reload) + echo "Updating all available device nodes in $UDEV_ROOT" + udevadm control --reload-rules + rm -rf $UDEV_ROOT/.udev $UDEV_ROOT/disk + cp --preserve=all --recursive --update /lib/udev/devices/* $UDEV_ROOT + ;; + + *) + echo "Usage: $0 {start|stop|restart|reload|force-reload}" + exit 1 + ;; +esac diff --git a/source/installer/sources/initrd/etc/rc.d/rc.usb b/source/installer/sources/initrd/etc/rc.d/rc.usb new file mode 100755 index 000000000..0c40b5b46 --- /dev/null +++ b/source/installer/sources/initrd/etc/rc.d/rc.usb @@ -0,0 +1,71 @@ +#!/bin/sh +# rc.usb: search for USB devices needed for installation. + +# This is a function to unload the USB modules: +usb_stop() { + modprobe -r usb-storage keybdev mousedev usbmouse hid usbkbd \ + input uhci usb-uhci usb-ohci uhci-hcd ohci-hcd ehci-hcd 2> /dev/null + umount usbfs 2> /dev/null + modprobe -r usbcore 2> /dev/null +} + +# This is a function to attempt to enable a USB keyboard, +# mouse, and storage (CD or hard drive). +# If this causes problems for you, use "nousb" as a kernel +# command line option at boot time. +usb_start() { + # If nousb was given at boot, skip. + if ! cat /proc/cmdline | grep nousb 1> /dev/null 2> /dev/null ; then + # If there aren't even any modules for this kernel, skip. + if [ -d /lib/modules/`uname -r` ]; then + # If usbcore is already loaded, skip. + if ! grep usbcore /proc/modules 1> /dev/null 2> /dev/null ; then + echo "Probing for USB controllers." + echo "(to skip, give a 'nousb' kernel option at boot)" + #sleep 5 + modprobe -q usbcore >/dev/null 2>&1 + # Try to mount usbfs: + if [ -d /proc/bus/usb -a ! -f /proc/bus/usb/devices ]; then + mount -t usbfs usbfs /proc/bus/usb + fi + # Try to load all the hub modules: + modprobe -q ehci-hcd >/dev/null 2>&1 + modprobe -q ohci-hcd >/dev/null 2>&1 + modprobe -q uhci-hcd >/dev/null 2>&1 + modprobe -q usb-ohci >/dev/null 2>&1 + # NOTE: this prefers "uhci"; you may prefer "usb-uhci". + #modprobe -q usb-uhci >/dev/null 2>&1 || modprobe -q uhci >/dev/null 2>&1 + modprobe -q uhci >/dev/null 2>&1 || modprobe -q usb-uhci >/dev/null 2>&1 + # Load input core: + modprobe -q input >/dev/null 2>&1 + # Load USB keyboard: + modprobe -q usbkbd >/dev/null 2>&1 + # Load Human Interface Device (HID) USB module: + modprobe -q hid >/dev/null 2>&1 + # Load mouse (just in case (TM)) and keyboard USB input modules: + modprobe -q mousedev >/dev/null 2>&1 + modprobe -q keybdev >/dev/null 2>&1 + # Attempt to load storage support. Some funny USB ports (non-0 LUN) might not work + # so well, but most are well-behaved. + modprobe -q usb-storage >/dev/null 2>&1 + fi + fi + fi +} + +case "$1" in +'start') + usb_start + ;; +'stop') + usb_stop + ;; +'restart') + usb_stop + sleep 5 + usb_start + ;; +*) + echo "usage $0 start|stop|restart" +esac + diff --git a/source/installer/sources/initrd/etc/scsi_id.config b/source/installer/sources/initrd/etc/scsi_id.config new file mode 100644 index 000000000..d2a10a5f7 --- /dev/null +++ b/source/installer/sources/initrd/etc/scsi_id.config @@ -0,0 +1,17 @@ +# +# scsi_id configuration +# +# lower or upper case has no effect on the left side. Quotes (") are +# required for spaces in values. Model is the same as the SCSI +# INQUIRY product identification field. Per the SCSI INQUIRY, the vendor +# is limited to 8 bytes, model to 16 bytes. +# +# The first matching line found is used. Short matches match longer ones, +# if you do not want such a match space fill the extra bytes. If no model +# is specified, only the vendor string need match. +# +# options=<any scsi_id command line options> +# vendor=string[,model=string],options=<per-device scsi_id options> + +# some libata drives require vpd page 0x80 +vendor="ATA",options=-p 0x80 diff --git a/source/installer/sources/initrd/etc/securetty b/source/installer/sources/initrd/etc/securetty new file mode 100644 index 000000000..e4b461401 --- /dev/null +++ b/source/installer/sources/initrd/etc/securetty @@ -0,0 +1,20 @@ +# This file defines which devices root can log in on. + +# These are the ttys on the physical console: +console +tty1 +tty2 +tty3 +tty4 +tty5 +tty6 + +# These are remote ttys, and uncommenting them might be less than fully secure: +ttyS0 +ttyS1 +ttyS2 +ttyS3 +#ttyp0 +#ttyp1 +#ttyp2 +#ttyp3 diff --git a/source/installer/sources/initrd/etc/shadow b/source/installer/sources/initrd/etc/shadow new file mode 100644 index 000000000..577b5d0f5 --- /dev/null +++ b/source/installer/sources/initrd/etc/shadow @@ -0,0 +1,17 @@ +root:joFWnPF2bJhPc:9797:0::::: +halt:*:9797:0::::: +operator:*:9797:0::::: +shutdown:*:9797:0::::: +sync:*:9797:0::::: +bin:*:9797:0::::: +ftp:*:9797:0::::: +daemon:*:9797:0::::: +adm:*:9797:0::::: +lp:*:9797:0::::: +mail:*:9797:0::::: +news:*:9797:0::::: +uucp:*:9797:0::::: +man:*:9797:0::::: +games:*:9797:0::::: +guest:*:9797:0::::: +nobody:*:9797:0::::: diff --git a/source/installer/sources/initrd/etc/shells b/source/installer/sources/initrd/etc/shells new file mode 100644 index 000000000..de0249b3b --- /dev/null +++ b/source/installer/sources/initrd/etc/shells @@ -0,0 +1,2 @@ +/bin/sh +/bin/bash diff --git a/source/installer/sources/initrd/etc/syslog.conf b/source/installer/sources/initrd/etc/syslog.conf new file mode 100644 index 000000000..055ab1c27 --- /dev/null +++ b/source/installer/sources/initrd/etc/syslog.conf @@ -0,0 +1,4 @@ +# Write any informational messages on virtual console 4: +*.=info;*.=notice /dev/tty4 +*.=debug /dev/tty4 +*.warn;*.err /dev/tty4 diff --git a/source/installer/sources/initrd/etc/termcap b/source/installer/sources/initrd/etc/termcap new file mode 100644 index 000000000..6fcd14ade --- /dev/null +++ b/source/installer/sources/initrd/etc/termcap @@ -0,0 +1,238 @@ +# [Slackware note: If you're looking for a big, full-featured termcap, +# use /etc/termcap-BSD instead ] +# +# From: miquels@drinkel.ow.org (Miquel van Smoorenburg) +# +# Okay guys, here is a shorter termcap that does have most +# capabilities and is ncurses compatible. If it works for you +# I'd like to hear about it. +# +# Some entries in termcap 2.0.7 are too long and your programs +# may complain "tgetent: warning: termcap entry too long". Here is +# a smaller termcap. But it may not cover as many terminals as the one +# in termcap 2.0.7. You can install it as /etc/termcap. +# +# termcap Termcap entries for the VT family. +# All termcap entries have been freed of the 'ks' and +# 'ke' entries, that put the keypad into applications +# mode. This is a generally misused entry, not ment +# for the vt100 "applications" mode. Now cursor and +# function keys will work in all programs. +# +# Also, there is a "generic" vt entry with common +# entries for all terminals, on which all other entries +# are built. +# +# Version: @(#) vt-termcap 1.37 12-Mar-1996 MvS +# + +# Generic VT entry. +vg|vt-generic|Generic VT entries:\ + :bs:mi:ms:pt:xn:xo:it#8:\ + :RA=\E[?7l:SA=\E?7h:\ + :bl=^G:cr=^M:ta=^I:\ + :cm=\E[%i%d;%dH:\ + :le=^H:up=\E[A:do=\E[B:nd=\E[C:\ + :LE=\E[%dD:RI=\E[%dC:UP=\E[%dA:DO=\E[%dB:\ + :ho=\E[H:cl=\E[H\E[2J:ce=\E[K:cb=\E[1K:cd=\E[J:sf=\ED:sr=\EM:\ + :ct=\E[3g:st=\EH:\ + :cs=\E[%i%d;%dr:sc=\E7:rc=\E8:\ + :ei=\E[4l:ic=\E[@:IC=\E[%d@:al=\E[L:AL=\E[%dL:\ + :dc=\E[P:DC=\E[%dP:dl=\E[M:DL=\E[%dM:\ + :so=\E[7m:se=\E[m:us=\E[4m:ue=\E[m:\ + :mb=\E[5m:mh=\E[2m:md=\E[1m:mr=\E[7m:me=\E[m:\ + :sc=\E7:rc=\E8:kb=\177:\ + :ku=\E[A:kd=\E[B:kr=\E[C:kl=\E[D: + +## Linux console. One should really set TERM=linux instead of TERM=console. +#lx|linux|console|con80x25|LINUX System Console:\ +# :co#80:li#25:am:\ +# :is=\E[m\E[?1l\E>\E[10m:\ +# :rs=\E[m\E[?1l\E>\E[10m:\ +# :ch=\E[%i%dG:cv=\E[%i%dd:\ +# :eA=\E)0:as=^N:ae=^O:ac=aaffggjjkkllmmnnooqqssttuuvvwwxx:\ +# :ve=\E[?25h:vi=\E[?25l:\ +# :se=\E[27m:ue=\E[24m:mh=\E[2m:\ +# :ks=:ke=:\ +# :kh=\E[1~:kH=\E[4~:kI=\E[2~:kD=\E[3~:kP=\E[5~:kN=\E[6~:\ +# :k1=\E[[A:k2=\E[[B:k3=\E[[C:k4=\E[[D:k5=\E[[E:\ +# :k6=\E[17~:k7=\E[18~:k8=\E[19~:k9=\E[20~:k0=\E[21~:\ +# :F1=\E[23~:F2=\E[24~:\ +# :tc=vt-generic: + +# Slackware 3.1 linux termcap entry (Sat Apr 27 23:03:58 CDT 1996): +lx|linux|console|con80x25|LINUX System Console:\ + :do=^J:co#80:li#25:cl=\E[H\E[J:sf=\ED:sb=\EM:\ + :le=^H:bs:am:cm=\E[%i%d;%dH:nd=\E[C:up=\E[A:\ + :ce=\E[K:cd=\E[J:so=\E[7m:se=\E[27m:us=\E[36m:ue=\E[m:\ + :md=\E[1m:mr=\E[7m:mb=\E[5m:me=\E[m:is=\E[1;25r\E[25;1H:\ + :ll=\E[1;25r\E[25;1H:al=\E[L:dc=\E[P:dl=\E[M:\ + :it#8:ku=\E[A:kd=\E[B:kr=\E[C:kl=\E[D:kb=^H:ti=\E[r\E[H:\ + :ho=\E[H:kP=\E[5~:kN=\E[6~:kH=\E[4~:kh=\E[1~:kD=\E[3~:kI=\E[2~:\ + :k1=\E[[A:k2=\E[[B:k3=\E[[C:k4=\E[[D:k5=\E[[E:k6=\E[17~:\ + :k7=\E[18~:k8=\E[19~:k9=\E[20~:k0=\E[21~:K1=\E[1~:K2=\E[5~:\ + :K4=\E[4~:K5=\E[6~:\ + :pt:sr=\EM:vt#3:xn:km:bl=^G:vi=\E[?25l:ve=\E[?25h:vs=\E[?25h:\ + :sc=\E7:rc=\E8:cs=\E[%i%d;%dr:\ + :r1=\Ec:r2=\Ec:r3=\Ec: + +# Some other, commonly used linux console entries. +lx|con80x28:co#80:li#28:tc=linux: +lx|con80x43:co#80:li#43:tc=linux: +lx|con80x50:co#80:li#50:tc=linux: +lx|con100x37:co#100:li#37:tc=linux: +lx|con100x40:co#100:li#40:tc=linux: +lx|con132x43:co#132:li#43:tc=linux: + +# vt102 - vt100 + insert line etc. VT102 does not have insert character. +v2|vt102|DEC vt102 compatible:\ + :co#80:li#24:\ + :ic@:IC@:\ + :is=\E[m\E[?1l\E>:\ + :rs=\E[m\E[?1l\E>:\ + :eA=\E)0:as=^N:ae=^O:ac=aaffggjjkkllmmnnooqqssttuuvvwwxx:\ + :ks=:ke=:\ + :k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:\ + :tc=vt-generic: + +# vt100 - really vt102 without insert line, insert char etc. +vt|vt100|DEC vt100 compatible:\ + :im@:mi@:al@:dl@:ic@:dc@:AL@:DL@:IC@:DC@:\ + :tc=vt102: + +# Standard vt320 (based on my own digital vt320) +v3|vt320|DEC vt320:\ + :co#80:li#24:hs:es:\ + :is=\E[m\E[2$~\E[?1l\E>:\ + :rs=\E[m\E[?1l\E>:\ + :ve=\E[?25h:vi=\E[?25l:\ + :se=\E[27m:ue=\E[24m:mh=\E[2m:\ + :eA=\E)0:as=^N:ae=^O:ac=aaffggjjkkllmmnnooqqssttuuvvwwxx:\ + :ts=\E[1$}\E[1;%i%dH:fs=\E[0$}:ds=\E[1$}\r\E[m\E[K\E[0$}:\ + :ks=:ke=:\ + :kI=\E[2~:kD=\E[3~:kP=\E[5~:kN=\E[6~:\ + :@4=\E[29~:@0=\E[1~:*6=\E[4~:\ + :k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:k5=\E[16~\ + :k6=\E[17~:k7=\E[18~:k8=\E[19~:k9=\E[20~:k0=\E[21~:\ + :F1=\E[23~:F2=\E[24~:F3=\E[25~:F4=\E[26~:F5=\E[28~:\ + :F6=\E[29~:F7=\E[31~:F8=\E[32~:\ + :tc=vt-generic: + +v8|vt320-8|DEC vt320 in 8-bit mode:\ + :kI=\2332~:kD=\2333~:kP=\2335~:kN=\2336~:\ + :@4=\23329~:@0=\2331~:*6=\2334~:\ + :k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:k5=\23316~\ + :k6=\23317~:k7=\23318~:k8=\23319~:k9=\23320~:k0=\23321~:\ + :F1=\23323~:F2=\23324~:F3=\23325~:F4=\23326~:F5=\23328~:\ + :F6=\23329~:F7=\23331~:F8=\23332~:\ + :ku=\233A:kd=\233B:kr=\233C:kl=\233D:\ + :tc=vt320: + +# Entry for minicom so it uses the PC (IBM) character set. +# If this doesn't work for kernels between 1.1.18 and 1.1.80, +# change \E(U -> \E[11m (enter ANSI mode) +# and \E(B -> \E[10m (leave ANSI mode) +mc|minicom|ansi-mc|termcap entry for minicom on the console:\ + :is=\E[m\E>\E(U:\ + :rs=\E[m\E>\E(B:\ + :as@:ae@:eA@:ac@:\ + :bl=\E(B\007\E(U:\ + :vb=\E(B\007\E(U:\ + :tc=linux: + +# Entry for an xterm. Insert mode has been disabled. +vs|xterm|xterm-color|vs100|xterm terminal emulator (X Window System):\ + :am:bs:mi@:km:co#80:li#55:\ + :im@:ei@:\ + :ct=\E[3k:ue=\E[m:\ + :is=\E[m\E[?1l\E>:\ + :rs=\E[m\E[?1l\E>:\ + :eA=\E)0:as=^N:ae=^O:ac=aaffggjjkkllmmnnooqqssttuuvvwwxx:\ + :kI=\E[2~:kD=\177:kP=\E[5~:kN=\E[6~:\ + :k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~:k5=\E[15~:\ + :k6=\E[17~:k7=\E[18~:k8=\E[19~:k9=\E[20~:k0=\E[21~:\ + :F1=\E[23~:F2=\E[24~:\ + :kh=\E[H:kH=\EOw:\ + :ks=:ke=:\ + :te=\E[2J\E[?47l\E8:ti=\E7\E[?47h:\ + :tc=vt-generic: + +# Some other entries for the same xterm. +v2|xterms|vs100s|xterm small window:\ + :co#80:li#24:tc=xterm: +vb|xterm-bold|xterm with bold instead of underline:\ + :us=\E[1m:tc=xterm: +vi|xterm-ins|xterm with insert mode:\ + :mi:im=\E[4h:ei=\E[4l:tc=xterm: + +Eterm|Eterm Terminal Emulator (X11 Window System):\ + :am:bw:eo:km:mi:ms:xn:xo:\ + :co#80:it#8:li#24:lm#0:pa#64:Co#8:AF=\E[3%dm:AB=\E[4%dm:op=\E[39m\E[49m:\ + :AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:DO=\E[%dB:IC=\E[%d@:\ + :K1=\E[7~:K2=\EOu:K3=\E[5~:K4=\E[8~:K5=\E[6~:LE=\E[%dD:\ + :RI=\E[%dC:UP=\E[%dA:ae=^O:al=\E[L:as=^N:bl=^G:cd=\E[J:\ + :ce=\E[K:cl=\E[H\E[2J:cm=\E[%i%d;%dH:cr=^M:\ + :cs=\E[%i%d;%dr:ct=\E[3g:dc=\E[P:dl=\E[M:do=\E[B:\ + :ec=\E[%dX:ei=\E[4l:ho=\E[H:i1=\E[?47l\E>\E[?1l:ic=\E[@:\ + :im=\E[4h:is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l:\ + :k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~:k5=\E[15~:\ + :k6=\E[17~:k7=\E[18~:k8=\E[19~:k9=\E[20~:kD=\E[3~:\ + :kI=\E[2~:kN=\E[6~:kP=\E[5~:kb=^H:kd=\E[B:ke=:kh=\E[7~:\ + :kl=\E[D:kr=\E[C:ks=:ku=\E[A:le=^H:mb=\E[5m:md=\E[1m:\ + :me=\E[m\017:mr=\E[7m:nd=\E[C:rc=\E8:\ + :sc=\E7:se=\E[27m:sf=^J:so=\E[7m:sr=\EM:st=\EH:ta=^I:\ + :te=\E[2J\E[?47l\E8:ti=\E7\E[?47h:ue=\E[24m:up=\E[A:\ + :us=\E[4m:vb=\E[?5h\E[?5l:ve=\E[?25h:vi=\E[?25l:\ + :ac=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~: + +# DOS terminal emulator such as Telix or TeleMate. +# This probably also works for the SCO console, though it's incomplete. +an|ansi|ansi-bbs|ANSI terminals (emulators):\ + :co#80:li#24:am:\ + :is=:rs=\Ec:kb=^H:\ + :as=\E[m:ae=:eA=:\ + :ac=0\333+\257,\256.\031-\030a\261f\370g\361j\331k\277l\332m\300n\305q\304t\264u\303v\301w\302x\263~\025:\ + :kD=\177:kH=\E[Y:kN=\E[U:kP=\E[V:kh=\E[H:\ + :k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:k5=\EOT:\ + :k6=\EOU:k7=\EOV:k8=\EOW:k9=\EOX:k0=\EOY:\ + :tc=vt-generic: + +# This seems to be an entry for other x86 based unices. +at|at386-m|386AT-M|386at-m|at/386 console:\ + :am:bw:eo:xt:co#80:li#25:\ + :ae=\E[10m:as=\E[12m:\ + :is=\E[0;10;38m:\ + :k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:k5=\EOT:\ + :k6=\EOU:k7=\EOV:k8=\EOW:k9=\EOX:\ + :kh=\E[H:us=\E[4m:vb=^G:nl=\E[B:kb=^H:\ + :tc=vt-generic: + +# Yeah - Minix still lives :) +ma|minix|minix-am|minix-vcam|MINIX 1.5 Virtual Console:\ + :am:bs:co#80:li#25:km:ms:\ + :is=\E[0m\EPlinewrap.on\E\\:\ + :rs=\Ec\EPlinewrap.on\E\\:\ + :as=:ae=:eA=:\ + :ac=0\333+\257,\256.\031-\030a\261f\370g\361j\331k\277l\332m\300n\305q\304t\264u\303v\301w\302x\263~\025:\ + :k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:k5=\EOT:\ + :k6=\EOU:k7=\EOV:k8=\EOW:k9=\EOX:k0=\EOY:\ + :kD=\177:kH=\E[Y:kN=\E[U:kP=\E[V:kh=\E[H:kb=^H:\ + :ve=\EPcursor.on\E\\:vi=\EPcursor.off\E\\:\ + :tc=vt-generic: + +# Some obligatory historic entries. +sa|network|ethernet|arpanet:co#80:os:am: +su|dumb|un|unknown:co#80:os:am: +sd|du|dialup:co#80:os:am: +t7|37|tty37|model 37 teletype:\ + :cr=^M:do=^J:nl=^J:bl=^G:le=^H:bs:hc:hu=\E8:hd=\E9:up=\E7:os: + +# Yes, there really are people that login from a Sun Console. +mu|sun|Sun Microsystems Workstation console:\ + :am:bs:km:mi:ms:pt:\ + :li#34:co#80:cl=^L:cm=\E[%i%d;%dH:nd=\E[C:up=\E[A:\ + :ce=\E[K:cd=\E[J:so=\E[7m:se=\E[m:\ + :kd=\E[B:kl=\E[D:ku=\E[A:kr=\E[C:kh=\E[H:\ + :k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:\ + :al=\E[L:dl=\E[M:im=:ei=:ic=\E[@:dc=\E[P:\ + :rs=\E[s: diff --git a/source/installer/sources/initrd/init b/source/installer/sources/initrd/init new file mode 120000 index 000000000..ebb2a55dd --- /dev/null +++ b/source/installer/sources/initrd/init @@ -0,0 +1 @@ +sbin/init
\ No newline at end of file diff --git a/source/installer/sources/initrd/mnt/README b/source/installer/sources/initrd/mnt/README new file mode 100644 index 000000000..ac27d0cea --- /dev/null +++ b/source/installer/sources/initrd/mnt/README @@ -0,0 +1,5 @@ + +...don't go mounting your source partition(s) here. This directory is used +by 'setup' to mount your target partition(s). If you need to mount something, +make your own directory. + diff --git a/source/installer/sources/initrd/nfs b/source/installer/sources/initrd/nfs new file mode 120000 index 000000000..3f165753a --- /dev/null +++ b/source/installer/sources/initrd/nfs @@ -0,0 +1 @@ +/var/log/mount
\ No newline at end of file diff --git a/source/installer/sources/initrd/root/README b/source/installer/sources/initrd/root/README new file mode 120000 index 000000000..e138796b4 --- /dev/null +++ b/source/installer/sources/initrd/root/README @@ -0,0 +1 @@ +/etc/motd
\ No newline at end of file diff --git a/source/installer/sources/initrd/sbin/brc b/source/installer/sources/initrd/sbin/brc new file mode 100755 index 000000000..683f471bf --- /dev/null +++ b/source/installer/sources/initrd/sbin/brc @@ -0,0 +1,19 @@ +#!/bin/sh +# +# /sbin/brc (whatever that means ;) +# This script gets run just before the system is down. +# +cat << EOF + + +The system is rebooting NOW! + +Syncing disks... +EOF +/bin/sync +echo +echo "Unmounting file systems... " +/bin/umount -a 1> /dev/null 2> /dev/null +echo +sleep 2 +/sbin/reboot -f diff --git a/source/installer/sources/initrd/sbin/cfdisk b/source/installer/sources/initrd/sbin/cfdisk new file mode 100755 index 000000000..582a1414b --- /dev/null +++ b/source/installer/sources/initrd/sbin/cfdisk @@ -0,0 +1,5 @@ +#!/bin/sh +cfdisk.bin $* +if [ -x /dev/makedevs.sh ]; then + /dev/makedevs.sh +fi diff --git a/source/installer/sources/initrd/sbin/fakedate b/source/installer/sources/initrd/sbin/fakedate new file mode 100755 index 000000000..e89d438dc --- /dev/null +++ b/source/installer/sources/initrd/sbin/fakedate @@ -0,0 +1,4 @@ +if [ -r /.today ]; then + date -s yesterday 1> /dev/null 2> /dev/null + rm -f /.today +fi diff --git a/source/installer/sources/initrd/sbin/fdisk b/source/installer/sources/initrd/sbin/fdisk new file mode 100755 index 000000000..7b0c2693f --- /dev/null +++ b/source/installer/sources/initrd/sbin/fdisk @@ -0,0 +1,5 @@ +#!/bin/sh +fdisk.bin $* +if [ -x /dev/makedevs.sh ]; then + /dev/makedevs.sh +fi diff --git a/source/installer/sources/initrd/sbin/fixdate b/source/installer/sources/initrd/sbin/fixdate new file mode 100755 index 000000000..096349909 --- /dev/null +++ b/source/installer/sources/initrd/sbin/fixdate @@ -0,0 +1,4 @@ +if [ ! -r /.today ]; then + date -s tomorrow 1> /dev/null 2> /dev/null + touch /.today +fi diff --git a/source/installer/sources/initrd/sbin/probe b/source/installer/sources/initrd/sbin/probe new file mode 100755 index 000000000..eca6db9dd --- /dev/null +++ b/source/installer/sources/initrd/sbin/probe @@ -0,0 +1,438 @@ +#!/bin/sh +# This is 'probe', a wrapper for using fdisk to gather drive info for +# the Slackware setup scripts. I hate to bounce this much garbage through +# a tmpdir, but it looks like large variables can make ash crash... + +# Many thanks to Vincent Rivellino for contributing the patches to support +# Mylex and Compaq RAID controllers. + +# Regularize output that will be parsed: +unset LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY \ + LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT \ + LC_IDENTIFICATION LC_ALL +LANG=C +export LANG + +TMP=/var/log/setup/tmp + +# Use cached results if they exist and /proc/partitions has not changed: +if [ -r $TMP/SeTpartition.md5 -a -r $TMP/SeTfdisk ]; then + if [ "$(cat $TMP/SeTpartition.md5)" = "$(md5sum /proc/partitions)" ]; then + cat $TMP/SeTfdisk + exit 0 + fi +fi + +# First run, or /proc/partitions has changed. +# Make a checksum for later comparison: +md5sum /proc/partitions > $TMP/SeTpartition.md5 + +# Wipe any previously existing results: +rm -f $TMP/SeTfdisk + +# listide major minor hd1 hd2 (2 base devs for major) +list_ide() { + if [ "$2" = "0" ]; then + fdisk -l /dev/$3 >> $TMP/SeTfdisk + elif [ "$2" = "64" ]; then + fdisk -l /dev/$4 >> $TMP/SeTfdisk + fi +} + +list_scsi() { + # find drive # 0 - 15 + DRV=`expr $1 / 16` + NUM=`expr $1 % 16` + if [ ! "$NUM" = "0" ]; then + return + fi + if [ "$DRV" = "0" ]; then + fdisk -l /dev/sda >> $TMP/SeTfdisk + elif [ "$DRV" = "1" ]; then + fdisk -l /dev/sdb >> $TMP/SeTfdisk + elif [ "$DRV" = "2" ]; then + fdisk -l /dev/sdc >> $TMP/SeTfdisk + elif [ "$DRV" = "3" ]; then + fdisk -l /dev/sdd >> $TMP/SeTfdisk + elif [ "$DRV" = "4" ]; then + fdisk -l /dev/sde >> $TMP/SeTfdisk + elif [ "$DRV" = "5" ]; then + fdisk -l /dev/sdf >> $TMP/SeTfdisk + elif [ "$DRV" = "6" ]; then + fdisk -l /dev/sdg >> $TMP/SeTfdisk + elif [ "$DRV" = "7" ]; then + fdisk -l /dev/sdh >> $TMP/SeTfdisk + elif [ "$DRV" = "8" ]; then + fdisk -l /dev/sdi >> $TMP/SeTfdisk + elif [ "$DRV" = "9" ]; then + fdisk -l /dev/sdj >> $TMP/SeTfdisk + elif [ "$DRV" = "10" ]; then + fdisk -l /dev/sdk >> $TMP/SeTfdisk + elif [ "$DRV" = "11" ]; then + fdisk -l /dev/sdl >> $TMP/SeTfdisk + elif [ "$DRV" = "12" ]; then + fdisk -l /dev/sdm >> $TMP/SeTfdisk + elif [ "$DRV" = "13" ]; then + fdisk -l /dev/sdn >> $TMP/SeTfdisk + elif [ "$DRV" = "14" ]; then + fdisk -l /dev/sdo >> $TMP/SeTfdisk + elif [ "$DRV" = "15" ]; then + fdisk -l /dev/sdp >> $TMP/SeTfdisk + fi +} + +# List Mylex RAID device +list_rd() { + # find drive + DRV=`expr $2 / 8` + NUM=`expr $2 % 8` + if [ ! "$NUM" = "0" ]; then + return + fi + fdisk -l /dev/rd/c$1d$DRV >> $TMP/SeTfdisk + #output_gpt_partitions /dev/rd/c$1d$DRV >> $TMP/SeTfdisk +} + +# List Cpq SMART/2 RAID device +list_ida() { + # find drive + DRV=`expr $2 / 16` + NUM=`expr $2 % 16` + if [ ! "$NUM" = "0" ]; then + return + fi + fdisk -l /dev/ida/c$1d$DRV >> $TMP/SeTfdisk + #output_gpt_partitions /dev/ida/c$1d$DRV >> $TMP/SeTfdisk +} + +list_cciss() { + # find drive + DRV=`expr $2 / 16` + NUM=`expr $2 % 16` + if [ ! "$NUM" = "0" ]; then + return + fi + fdisk -l /dev/cciss/c$1d$DRV >> $TMP/SeTfdisk + #output_gpt_partitions /dev/cciss/c$1d$DRV >> $TMP/SeTfdisk +} + +list_ataraid() { + # find drive + DRV=`expr $2 / 16` + NUM=`expr $2 % 16` + if [ "$NUM" = "0" ]; then + fdisk -l /dev/ataraid/d$DRV >> $TMP/SeTfdisk + #output_gpt_partitions /dev/ataraid/d$DRV >> $TMP/SeTfdisk + else + return + fi +} + +list_amiraid() { + # find drive + DRV=`expr $2 / 16` + NUM=`expr $2 % 16` + if [ "$NUM" = "0" ]; then + fdisk -l /dev/amiraid/ar$DRV >> $TMP/SeTfdisk + #output_gpt_partitions /dev/amiraid/ar$DRV >> $TMP/SeTfdisk + else + return + fi +} + +list_mmc() { + # find drive + DRV=`expr $2 / 8` + NUM=`expr $2 % 8` + if [ "$NUM" = "0" ]; then + fdisk -l /dev/mmcblk$DRV >> $TMP/SeTfdisk + #output_gpt_partitions /dev/mmcblk$DRV >> $TMP/SeTfdisk + else + return + fi +} + +list_nvme() { + fdisk -l | grep $1 >> $TMP/SeTfdisk 2> /dev/null +} + +is_swap() { + HEADER=$(dd if="$1" bs=1 skip=4086 count=10 2>/dev/null | strings) + if [ "$HEADER" = "SWAPSPACE2" -o "$HEADER" = "SWAP_SPACE" ]; then + return 0 + else + return 1 + fi +} + +list_md() { + if ( is_swap "/dev/$2" ); then TYPE="Linux swap"; else TYPE="Linux"; fi + echo "/dev/$2 1 2 $1 kk $TYPE" >> $TMP/SeTfdisk +} + +list_lvm() { + lvscan 2>/dev/null | grep "ACTIVE" | while read line ; do + SMASHED_LINE=$line + if [ "$SMASHED_LINE" = "" ]; then + break; + fi + DEV=`echo $SMASHED_LINE | cut -f2 -d"'"` + SIZE=`lvdisplay $DEV -C --units k --noheadings --separator : | cut -f4 -d':' | sed -e 's/^\([0-9]*\)[^0-9].*/\1/'` + TYPE="Linux" + if ( is_swap "$DEV" ); then TYPE="Linux swap"; fi + echo "$DEV 0 0 $SIZE lv $TYPE" >> $TMP/SeTfdisk + done +} + +# List any volumes created by cryptsetup +list_crypt() { + for i in $(ls /dev/mapper/); do + if cryptsetup status $i 2>/dev/null | grep "is active" 1>/dev/null ; then + DEV=$(cryptsetup status $i 2>/dev/null | grep "is active" | cut -f1 -d' ') + SIZE=$(fdisk -s $(cryptsetup status $i 2>/dev/null | grep "device:" | cut -f2 -d: | tr -d ' ')) + echo "$DEV 0 0 $SIZE lc Linux" >> $TMP/SeTfdisk + fi + done +} + +# List virtual partitions +list_virt() { + fdisk -l /dev/$1 >> $TMP/SeTfdisk + #output_gpt_partitions /dev/$1 >> $TMP/SeTfdisk +} + +output_gpt_partitions() { +# First, make sure the device is GPT: +if fdisk -l $1 2> /dev/null | grep -wq -e "GPT" -e "Disklabel type: gpt" ; then + unset output + # In the case of some RAID device like Mylex we will need to delimit the + # partition number. We will set a partition delimiter variable P set + # either to an empty string (default) or the needed delimiter. + TESTRAID="$(echo $1 | cut -f 2 -d /)" + case "$TESTRAID" in + 'amiraid' ) + P="p" + ;; + 'ataraid' ) + P="p" + ;; + 'cciss' ) + P="p" + ;; + 'ida' ) + P="p" + ;; + 'rd' ) + P="p" + ;; + *) + P="" + ;; + esac + gdisk -l $1 | tr -d '*' | while read parse ; do + if [ ! -z $output ]; then + line=$parse + if [ ! "$(echo $line | cut -b1)" = "" ]; then + gptpartition=${1}${P}$(echo $line | cut -f 1 -d ' ') + gpttype="$(echo $line | cut -f 6 -d ' ')" + if [ "$gpttype" = "8200" ]; then + fdisktype="Linux swap" + elif [ "$gpttype" = "0700" ]; then + if dd if=$gptpartition bs=1K count=1 2> /dev/null | grep -wq NTFS ; then + fdisktype="HPFS/NTFS" + elif dd if=$gptpartition bs=1K count=1 2> /dev/null | grep -wq EXFAT ; then + fdisktype="exFAT" + else + fdisktype="W95 FAT32" + fi + elif [ "$gpttype" = "AF00" ]; then + fdisktype="HFS+" + elif [ "$gpttype" = "EF00" ]; then + fdisktype="EFI System Partition" + elif [ "$gpttype" = "8300" ]; then + fdisktype=Linux + else + fdisktype="Unknown hex code $gpttype" + fi + sectorsize="$(gdisk -l $1 | tr -d '*' | grep "Logical sector size" | cut -f 2 -d : | cut -f 2 -d ' ')" + gptstart="$(expr $(echo $line | cut -f 2 -d ' ') \* $sectorsize / 1024)" + gptend="$(expr $(echo $line | cut -f 3 -d ' ') \* $sectorsize / 1024)" + gptsize="$(expr $gptend - $gptstart)" + echo $gptpartition $gptstart $gptend $gptsize $gpttype $fdisktype + fi + fi + if echo $parse | grep -q "^Number" ; then + output=true + fi + done +fi +} + +list_scsi_gpt() { + # find drive # 0 - 15 + DRV=`expr $1 / 16` + NUM=`expr $1 % 16` + if [ ! "$NUM" = "0" ]; then + return + fi + if [ "$DRV" = "0" ]; then + output_gpt_partitions /dev/sda + elif [ "$DRV" = "1" ]; then + output_gpt_partitions /dev/sdb + elif [ "$DRV" = "2" ]; then + output_gpt_partitions /dev/sdc + elif [ "$DRV" = "3" ]; then + output_gpt_partitions /dev/sdd + elif [ "$DRV" = "4" ]; then + output_gpt_partitions /dev/sde + elif [ "$DRV" = "5" ]; then + output_gpt_partitions /dev/sdf + elif [ "$DRV" = "6" ]; then + output_gpt_partitions /dev/sdg + elif [ "$DRV" = "7" ]; then + output_gpt_partitions /dev/sdh + elif [ "$DRV" = "8" ]; then + output_gpt_partitions /dev/sdi + elif [ "$DRV" = "9" ]; then + output_gpt_partitions /dev/sdj + elif [ "$DRV" = "10" ]; then + output_gpt_partitions /dev/sdk + elif [ "$DRV" = "11" ]; then + output_gpt_partitions /dev/sdl + elif [ "$DRV" = "12" ]; then + output_gpt_partitions /dev/sdm + elif [ "$DRV" = "13" ]; then + output_gpt_partitions /dev/sdn + elif [ "$DRV" = "14" ]; then + output_gpt_partitions /dev/sdo + elif [ "$DRV" = "15" ]; then + output_gpt_partitions /dev/sdp + fi +} + +# List the LVM volumes: +list_lvm + +# List CRYPT volumes: +list_crypt + +## This is obsolete, since fdisk handles GPT now. +## List GPT partitions: +#cat /proc/partitions | while read line ; do +# SMASHED_LINE=$line +# MAJOR=`echo $SMASHED_LINE | cut -f 1 -d ' '` +# MINOR=`echo $SMASHED_LINE | cut -f 2 -d ' '` +# if [ "$MAJOR" = "8" ]; then +# list_scsi_gpt $MINOR +# fi +#done + +# Other partitions: +if cat /proc/partitions | grep -E '/|[0-9]' 1>/dev/null 2>/dev/null ; then # new + cat /proc/partitions | grep -E '/|[0-9]' | while read line ; do + SMASHED_LINE=$line + MAJOR=`echo $SMASHED_LINE | cut -f 1 -d ' '` + MINOR=`echo $SMASHED_LINE | cut -f 2 -d ' '` + DEVNAME=`echo $SMASHED_LINE | cut -f 4 -d ' '` + if [ "$MAJOR" = "3" ]; then + list_ide $MAJOR $MINOR hda hdb + elif [ "$MAJOR" = "8" ]; then + list_scsi $MINOR + elif [ "$MAJOR" = "9" ]; then + list_md `echo $SMASHED_LINE | cut -f 3 -d ' ' | tr -d '/'` \ + `echo $SMASHED_LINE | cut -f 4 -d ' '` + elif [ "$MAJOR" = "22" ]; then + list_ide $MAJOR $MINOR hdc hdd + elif [ "$MAJOR" = "33" ]; then + list_ide $MAJOR $MINOR hde hdf + elif [ "$MAJOR" = "34" ]; then + list_ide $MAJOR $MINOR hdg hdh + elif [ "$MAJOR" = "48" ]; then + list_rd 0 $MINOR + elif [ "$MAJOR" = "49" ]; then + list_rd 1 $MINOR + elif [ "$MAJOR" = "50" ]; then + list_rd 2 $MINOR + elif [ "$MAJOR" = "51" ]; then + list_rd 3 $MINOR + elif [ "$MAJOR" = "52" ]; then + list_rd 4 $MINOR + elif [ "$MAJOR" = "53" ]; then + list_rd 5 $MINOR + elif [ "$MAJOR" = "54" ]; then + list_rd 6 $MINOR + elif [ "$MAJOR" = "55" ]; then + list_rd 7 $MINOR + elif [ "$MAJOR" = "56" ]; then + list_ide $MAJOR $MINOR hdi hdj + elif [ "$MAJOR" = "57" ]; then + list_ide $MAJOR $MINOR hdk hdl + elif [ "$MAJOR" = "72" ]; then + list_ida 0 $MINOR + elif [ "$MAJOR" = "73" ]; then + list_ida 1 $MINOR + elif [ "$MAJOR" = "74" ]; then + list_ida 2 $MINOR + elif [ "$MAJOR" = "75" ]; then + list_ida 3 $MINOR + elif [ "$MAJOR" = "76" ]; then + list_ida 4 $MINOR + elif [ "$MAJOR" = "77" ]; then + list_ida 5 $MINOR + elif [ "$MAJOR" = "78" ]; then + list_ida 6 $MINOR + elif [ "$MAJOR" = "79" ]; then + list_ida 7 $MINOR + elif [ "$MAJOR" = "80" ]; then + list_ide $MAJOR $MINOR hdm hdn + elif [ "$MAJOR" = "89" ]; then + list_ide $MAJOR $MINOR hdo hdp + elif [ "$MAJOR" = "90" ]; then + list_ide $MAJOR $MINOR hdq hdr + elif [ "$MAJOR" = "91" ]; then + list_ide $MAJOR $MINOR hds hdt + elif [ "$MAJOR" = "101" ]; then + list_amiraid $MAJOR $MINOR + elif [ "$MAJOR" = "104" \ + -o "$MAJOR" = "105" \ + -o "$MAJOR" = "106" \ + -o "$MAJOR" = "107" \ + -o "$MAJOR" = "108" \ + -o "$MAJOR" = "109" \ + -o "$MAJOR" = "110" \ + -o "$MAJOR" = "111" ]; then + list_cciss $(( $MAJOR - 104 )) $MINOR + elif [ "$MAJOR" = "114" ]; then + list_ataraid $MAJOR $MINOR + elif [ "$MAJOR" = "179" ]; then + list_mmc $MAJOR $MINOR + elif [ "$MAJOR" = "259" ]; then + if echo $line | grep -q p; then + list_nvme $DEVNAME + fi + elif [ $(expr $DEVNAME : 'x\?vd[^0-9]*$') -ne 0 ]; then + # The virtio devices have no set major dev number, so we have to search + # by name. Matches full drive names for KVM/lguest (vda) and Xen (xvda). + list_virt $DEVNAME + fi + done +else # old format and no RAID: + if cat /proc/partitions | grep md 1> /dev/null 2> /dev/null ; then + cat /proc/partitions | grep md | while read line ; do + SMASHED_LINE=$line + MAJOR=`echo $SMASHED_LINE | cut -f 1 -d ' '` + if [ "$MAJOR" = "9" ]; then + list_md `echo $SMASHED_LINE | cut -f 3 -d ' ' | tr -d '/'` \ + `echo $SMASHED_LINE | cut -f 4 -d ' '` + fi + done + fi + fdisk -l 2> /dev/null >> $TMP/SeTfdisk +fi + +# Change the names to be the same as what the old fdisk used: +sed -i -e "s/Linux filesystem/Linux/g" $TMP/SeTfdisk +sed -i -e "s/EFI System/EFI System Partition/g" $TMP/SeTfdisk +sed -i -e "s,EFI (FAT-12/16/32),EFI System Partition,g" $TMP/SeTfdisk + +cat $TMP/SeTfdisk diff --git a/source/installer/sources/initrd/sbin/rescan-scsi-bus b/source/installer/sources/initrd/sbin/rescan-scsi-bus new file mode 100755 index 000000000..0bfca50d1 --- /dev/null +++ b/source/installer/sources/initrd/sbin/rescan-scsi-bus @@ -0,0 +1,755 @@ +#!/bin/bash +# Skript to rescan SCSI bus, using the +# scsi add-single-device mechanism +# (c) 1998--2010 Kurt Garloff <kurt@garloff.de>, GNU GPL v2 or v3 +# (c) 2006--2008 Hannes Reinecke, GNU GPL v2 or later +# $Id: rescan-scsi-bus.sh,v 1.56 2012/01/14 22:23:53 garloff Exp $ + +SCAN_WILD_CARD=4294967295 + +setcolor () +{ + red="\e[0;31m" + green="\e[0;32m" + yellow="\e[0;33m" + bold="\e[0;1m" + norm="\e[0;0m" +} + +unsetcolor () +{ + red=""; green="" + yellow=""; norm="" +} + +# Output some text and return cursor to previous position +# (only works for simple strings) +# Stores length of string in LN and returns it +print_and_scroll_back () +{ + STRG="$1" + LN=${#STRG} + BK="" + declare -i cntr=0 + while test $cntr -lt $LN; do BK="$BK\e[D"; let cntr+=1; done + echo -en "$STRG$BK" + return $LN +} + +# Overwrite a text of length $1 (fallback to $LN) with whitespace +white_out () +{ + BK=""; WH="" + if test -n "$1"; then LN=$1; fi + declare -i cntr=0 + while test $cntr -lt $LN; do BK="$BK\e[D"; WH="$WH "; let cntr+=1; done + echo -en "$WH$BK" +} + +# Return hosts. sysfs must be mounted +findhosts_26 () +{ + hosts=`find /sys/class/scsi_host/host* -maxdepth 4 -type d -o -type l 2> /dev/null | awk -F'/' '{print $5}' | sed -e 's~host~~' | sort -nu` + scsi_host_data=`echo "$hosts" | sed -e 's~^~/sys/class/scsi_host/host~'` + for hostdir in $scsi_host_data; do + hostno=${hostdir#/sys/class/scsi_host/host} + if [ -f $hostdir/isp_name ] ; then + hostname="qla2xxx" + elif [ -f $hostdir/lpfc_drvr_version ] ; then + hostname="lpfc" + else + hostname=`cat $hostdir/proc_name` + fi + #hosts="$hosts $hostno" + echo "Host adapter $hostno ($hostname) found." + done + if [ -z "$hosts" ] ; then + echo "No SCSI host adapters found in sysfs" + exit 1; + fi + # Not necessary just use double quotes around variable to preserve new lines + #hosts=`echo $hosts | tr ' ' '\n'` +} + +# Return hosts. /proc/scsi/HOSTADAPTER/? must exist +findhosts () +{ + hosts= + for driverdir in /proc/scsi/*; do + driver=${driverdir#/proc/scsi/} + if test $driver = scsi -o $driver = sg -o $driver = dummy -o $driver = device_info; then continue; fi + for hostdir in $driverdir/*; do + name=${hostdir#/proc/scsi/*/} + if test $name = add_map -o $name = map -o $name = mod_parm; then continue; fi + num=$name + driverinfo=$driver + if test -r $hostdir/status; then + num=$(printf '%d\n' `sed -n 's/SCSI host number://p' $hostdir/status`) + driverinfo="$driver:$name" + fi + hosts="$hosts $num" + echo "Host adapter $num ($driverinfo) found." + done + done +} + +printtype () +{ + local type=$1 + + case "$type" in + 0) echo "Direct-Access " ;; + 1) echo "Sequential-Access" ;; + 2) echo "Printer " ;; + 3) echo "Processor " ;; + 4) echo "WORM " ;; + 5) echo "CD-ROM " ;; + 6) echo "Scanner " ;; + 7) echo "Optical Device " ;; + 8) echo "Medium Changer " ;; + 9) echo "Communications " ;; + 10) echo "Unknown " ;; + 11) echo "Unknown " ;; + 12) echo "RAID " ;; + 13) echo "Enclosure " ;; + 14) echo "Direct-Access-RBC" ;; + *) echo "Unknown " ;; + esac +} + +print02i() +{ + if [ "$1" = "*" ] ; then + echo "00" + else + printf "%02i" "$1" + fi +} + +# Get /proc/scsi/scsi info for device $host:$channel:$id:$lun +# Optional parameter: Number of lines after first (default = 2), +# result in SCSISTR, return code 1 means empty. +procscsiscsi () +{ + if test -z "$1"; then LN=2; else LN=$1; fi + CHANNEL=`print02i "$channel"` + ID=`print02i "$id"` + LUN=`print02i "$lun"` + if [ -d /sys/class/scsi_device ]; then + SCSIPATH="/sys/class/scsi_device/${host}:${channel}:${id}:${lun}" + if [ -d "$SCSIPATH" ] ; then + SCSISTR="Host: scsi${host} Channel: $CHANNEL Id: $ID Lun: $LUN" + if [ "$LN" -gt 0 ] ; then + IVEND=$(cat ${SCSIPATH}/device/vendor) + IPROD=$(cat ${SCSIPATH}/device/model) + IPREV=$(cat ${SCSIPATH}/device/rev) + SCSIDEV=$(printf ' Vendor: %-08s Model: %-16s Rev: %-4s' "$IVEND" "$IPROD" "$IPREV") + SCSISTR="$SCSISTR +$SCSIDEV" + fi + if [ "$LN" -gt 1 ] ; then + ILVL=$(cat ${SCSIPATH}/device/scsi_level) + type=$(cat ${SCSIPATH}/device/type) + ITYPE=$(printtype $type) + SCSITMP=$(printf ' Type: %-16s ANSI SCSI revision: %02d' "$ITYPE" "$((ILVL - 1))") + SCSISTR="$SCSISTR +$SCSITMP" + fi + else + return 1 + fi + else + grepstr="scsi$host Channel: $CHANNEL Id: $ID Lun: $LUN" + SCSISTR=`cat /proc/scsi/scsi | grep -A$LN -e"$grepstr"` + fi + if test -z "$SCSISTR"; then return 1; else return 0; fi +} + +# Find sg device with 2.6 sysfs support +sgdevice26 () +{ + if test -e /sys/class/scsi_device/$host\:$channel\:$id\:$lun/device/generic; then + SGDEV=`readlink /sys/class/scsi_device/$host\:$channel\:$id\:$lun/device/generic` + SGDEV=`basename $SGDEV` + else + for SGDEV in /sys/class/scsi_generic/sg*; do + DEV=`readlink $SGDEV/device` + if test "${DEV##*/}" = "$host:$channel:$id:$lun"; then + SGDEV=`basename $SGDEV`; return + fi + done + SGDEV="" + fi +} + +# Find sg device with 2.4 report-devs extensions +sgdevice24 () +{ + if procscsiscsi 3; then + SGDEV=`echo "$SCSISTR" | grep 'Attached drivers:' | sed 's/^ *Attached drivers: \(sg[0-9]*\).*/\1/'` + fi +} + +# Find sg device that belongs to SCSI device $host $channel $id $lun +# and return in SGDEV +sgdevice () +{ + SGDEV= + if test -d /sys/class/scsi_device; then + sgdevice26 + else + DRV=`grep 'Attached drivers:' /proc/scsi/scsi 2>/dev/null` + repdevstat=$((1-$?)) + if [ $repdevstat = 0 ]; then + echo "scsi report-devs 1" >/proc/scsi/scsi + DRV=`grep 'Attached drivers:' /proc/scsi/scsi 2>/dev/null` + if [ $? = 1 ]; then return; fi + fi + if ! `echo $DRV | grep 'drivers: sg' >/dev/null`; then + modprobe sg + fi + sgdevice24 + if [ $repdevstat = 0 ]; then + echo "scsi report-devs 0" >/proc/scsi/scsi + fi + fi +} + +# Test if SCSI device is still responding to commands +testonline () +{ + : testonline + RC=0 + if test ! -x /usr/bin/sg_turs; then return 0; fi + sgdevice + if test -z "$SGDEV"; then return 0; fi + sg_turs /dev/$SGDEV >/dev/null 2>&1 + RC=$? + # Handle in progress of becoming ready and unit attention -- wait at max 11s + declare -i ctr=0 + if test $RC = 2 -o $RC = 6; then + RMB=`sg_inq /dev/$SGDEV | grep 'RMB=' | sed 's/^.*RMB=\(.\).*$/\1/'` + print_and_scroll_back "$host:$channel:$id:$lun $SGDEV ($RMB) " + fi + while test $RC = 2 -o $RC = 6 && test $ctr -le 8; do + if test $RC = 2 -a "$RMB" != "1"; then echo -n "."; let $LN+=1; sleep 1 + else usleep 20000; fi + let ctr+=1 + sg_turs /dev/$SGDEV >/dev/null 2>&1 + RC=$? + done + if test $ctr != 0; then white_out; fi + # echo -e "\e[A\e[A\e[A${yellow}Test existence of $SGDEV = $RC ${norm} \n\n\n" + if test $RC = 1; then return $RC; fi + # Reset RC (might be !=0 for passive paths) + RC=0 + # OK, device online, compare INQUIRY string + INQ=`sg_inq $sg_len_arg /dev/$SGDEV 2>/dev/null` + IVEND=`echo "$INQ" | grep 'Vendor identification:' | sed 's/^[^:]*: \(.*\)$/\1/'` + IPROD=`echo "$INQ" | grep 'Product identification:' | sed 's/^[^:]*: \(.*\)$/\1/'` + IPREV=`echo "$INQ" | grep 'Product revision level:' | sed 's/^[^:]*: \(.*\)$/\1/'` + STR=`printf " Vendor: %-08s Model: %-16s Rev: %-4s" "$IVEND" "$IPROD" "$IPREV"` + IPTYPE=`echo "$INQ" | sed -n 's/.* Device_type=\([0-9]*\) .*/\1/p'` + IPQUAL=`echo "$INQ" | sed -n 's/ *PQual=\([0-9]*\) Device.*/\1/p'` + if [ "$IPQUAL" != 0 ] ; then + echo -e "\e[A\e[A\e[A\e[A${red}$SGDEV changed: ${bold}LU not available (PQual $IPQUAL)${norm} \n\n\n" + return 2 + fi + + TYPE=$(printtype $IPTYPE) + procscsiscsi + TMPSTR=`echo "$SCSISTR" | grep 'Vendor:'` + if [ "$TMPSTR" != "$STR" ]; then + echo -e "\e[A\e[A\e[A\e[A${red}$SGDEV changed: ${bold}\nfrom:${SCSISTR#* } \nto: $STR ${norm} \n\n\n" + return 1 + fi + TMPSTR=`echo "$SCSISTR" | sed -n 's/.*Type: *\(.*\) *ANSI.*/\1/p'` + if [ $TMPSTR != $TYPE ] ; then + echo -e "\e[A\e[A\e[A\e[A${red}$SGDEV changed: ${bold}\nfrom:${TMPSTR} \nto: $TYPE ${norm} \n\n\n" + return 1 + fi + return $RC +} + +# Test if SCSI device $host $channen $id $lun exists +# Outputs description from /proc/scsi/scsi (unless arg passed) +# Returns SCSISTR (empty if no dev) +testexist () +{ + : testexist + SCSISTR= + if procscsiscsi && test -z "$1"; then + echo "$SCSISTR" | head -n1 + echo "$SCSISTR" | tail -n2 | pr -o4 -l1 + fi +} + +# Returns the list of existing channels per host +chanlist () +{ + local hcil + local cil + local chan + local tmpchan + + for dev in /sys/class/scsi_device/${host}:* ; do + [ -d $dev ] || continue; + hcil=${dev##*/} + cil=${hcil#*:} + chan=${cil%%:*} + for tmpchan in $channelsearch ; do + if test "$chan" -eq $tmpchan ; then + chan= + fi + done + if test -n "$chan" ; then + channelsearch="$channelsearch $chan" + fi + done + if test -z "$channelsearch"; then channelsearch="0"; fi +} + +# Returns the list of existing targets per host +idlist () +{ + local hcil + local cil + local il + local target + local tmpid + + for dev in /sys/class/scsi_device/${host}:${channel}:* ; do + [ -d $dev ] || continue; + hcil=${dev##*/} + cil=${hcil#*:} + il=${cil#*:} + target=${il%%:*} + for tmpid in $idsearch ; do + if test "$target" -eq $tmpid ; then + target= + break + fi + done + if test -n "$target" ; then + idsearch="$idsearch $target" + fi + done +} + +# Returns the list of existing LUNs from device $host $channel $id $lun +# and returns list to stdout +getluns() +{ + sgdevice + if test -z "$SGDEV"; then return 1; fi + if test ! -x /usr/bin/sg_luns; then echo 0; return 1; fi + LLUN=`sg_luns /dev/$SGDEV 2>/dev/null | sed -n 's/ \(.*\)/\1/p'` + if test $? != 0; then echo 0; return 1; fi + #echo "$LLUN" | sed -n 's/.*lun=\(.*\)/\1/p' + for lun in $LLUN ; do + # Swap LUN number + l0=$(printf '%u' 0x$lun) + l1=$(( ($l0 >> 48) & 0xffff )) + l2=$(( ($l0 >> 32) & 0xffff )) + l3=$(( ($l0 >> 16) & 0xffff )) + l4=$(( $l0 & 0xffff )) + l0=$(( ( ( ($l4 * 0xffff) + $l3 ) * 0xffff + $l2 ) * 0xffff + $l1 )) + printf "%u\n" $l0 + done + return 0 +} + +# Wait for udev to settle (create device nodes etc.) +udevadm_settle() +{ + if test -x /sbin/udevadm; then + print_and_scroll_back " Calling udevadm settle (can take a while) " + /sbin/udevadm settle + white_out + elif test -x /sbin/udevsettle; then + print_and_scroll_back " Calling udevsettle (can take a while) " + /sbin/udevsettle + white_out + else + usleep 20000 + fi +} + +# Perform scan on a single lun $host $channel $id $lun +dolunscan() +{ + SCSISTR= + devnr="$host $channel $id $lun" + echo -e " Scanning for device $devnr ... " + printf "${yellow}OLD: $norm" + testexist + # Special case: lun 0 just got added (for reportlunscan), + # so make sure we correctly treat it as new + if test "$lun" = "0" -a "$1"; then + SCSISTR="" + printf "\r\e[A\e[A\e[A" + fi + : f $remove s $SCSISTR + if test "$remove" -a "$SCSISTR"; then + # Device exists: Test whether it's still online + # (testonline returns 1 if it's gone or has changed) + testonline + RC=$? + if test $RC != 0 -o ! -z "$forceremove"; then + echo -en "\r\e[A\e[A\e[A${red}REM: " + echo "$SCSISTR" | head -n1 + echo -e "${norm}\e[B\e[B" + if test -e /sys/class/scsi_device/${host}:${channel}:${id}:${lun}/device; then + echo 1 > /sys/class/scsi_device/${host}:${channel}:${id}:${lun}/device/delete + # FIXME: Can we skip udevadm settle for removal? + #udevadm_settle + usleep 20000 + else + echo "scsi remove-single-device $devnr" > /proc/scsi/scsi + if test $RC -eq 1 -o $lun -eq 0 ; then + # Try readding, should fail if device is gone + echo "scsi add-single-device $devnr" > /proc/scsi/scsi + fi + fi + fi + if test $RC = 0 -o "$forcerescan" ; then + if test -e /sys/class/scsi_device/${host}:${channel}:${id}:${lun}/device; then + echo 1 > /sys/class/scsi_device/${host}:${channel}:${id}:${lun}/device/rescan + udevadm_settle + fi + fi + printf "\r\e[A\e[A\e[A${yellow}OLD: $norm" + testexist + if test -z "$SCSISTR"; then + printf "\r${red}DEL: $norm\r\n\n" + let rmvd+=1; + return 1 + fi + fi + if test -z "$SCSISTR"; then + # Device does not exist, try to add + printf "\r${green}NEW: $norm" + if test -e /sys/class/scsi_host/host${host}/scan; then + echo "$channel $id $lun" > /sys/class/scsi_host/host${host}/scan 2> /dev/null + udevadm_settle + else + echo "scsi add-single-device $devnr" > /proc/scsi/scsi + fi + testexist + if test -z "$SCSISTR"; then + # Device not present + printf "\r\e[A"; + # Optimization: if lun==0, stop here (only if in non-remove mode) + if test $lun = 0 -a -z "$remove" -a $optscan = 1; then + break; + fi + else + let found+=1; + fi + fi +} + +# Perform report lun scan on $host $channel $id using REPORT_LUNS +doreportlun() +{ + lun=0 + SCSISTR= + devnr="$host $channel $id $lun" + echo -en " Scanning for device $devnr ...\r" + lun0added= + #printf "${yellow}OLD: $norm" + # Phase one: If LUN0 does not exist, try to add + testexist -q + if test -z "$SCSISTR"; then + # Device does not exist, try to add + #printf "\r${green}NEW: $norm" + if test -e /sys/class/scsi_host/host${host}/scan; then + echo "$channel $id $lun" > /sys/class/scsi_host/host${host}/scan 2> /dev/null + udevadm_settle + else + echo "scsi add-single-device $devnr" > /proc/scsi/scsi + fi + testexist -q + if test -n "$SCSISTR"; then + lun0added=1 + #testonline + else + # Device not present + # return + # Find alternative LUN to send getluns to + for dev in /sys/class/scsi_device/${host}:${channel}:${id}:*; do + [ -d "$dev" ] || continue + lun=${dev##*:} + break + done + fi + fi + targetluns=`getluns` + REPLUNSTAT=$? + lunremove= + #echo "getluns reports " $targetluns + olddev=`find /sys/class/scsi_device/ -name $host:$channel:$id:* 2>/dev/null` + oldluns=`echo "$olddev" | awk -F'/' '{print $5}' | awk -F':' '{print $4}'` + oldtargets="$targetluns" + # OK -- if we don't have a LUN to send a REPORT_LUNS to, we could + # fall back to wildcard scanning. Same thing if the device does not + # support REPORT_LUNS + # TODO: We might be better off to ALWAYS use wildcard scanning if + # it works + if test "$REPLUNSTAT" = "1"; then + if test -e /sys/class/scsi_host/host${host}/scan; then + echo "$channel $id -" > /sys/class/scsi_host/host${host}/scan 2> /dev/null + udevadm_settle + else + echo "scsi add-single-device $host $channel $id $SCAN_WILD_CARD" > /proc/scsi/scsi + fi + targetluns=`find /sys/class/scsi_device/ -name $host:$channel:$id:* 2>/dev/null | awk -F'/' '{print $5}' | awk -F':' '{print $4}' | sort -n` + let found+=`echo "$targetluns" | wc -l` + let found-=`echo "$olddev" | wc -l` + fi + if test -z "$targetluns"; then targetluns="$oldtargets"; fi + # Check existing luns + for dev in $olddev; do + [ -d "$dev" ] || continue + lun=${dev##*:} + newsearch= + inlist= + # OK, is existing $lun (still) in reported list + for tmplun in $targetluns; do + if test $tmplun -eq $lun ; then + inlist=1 + dolunscan $lun0added + else + newsearch="$newsearch $tmplun" + fi + done + # OK, we have now done a lunscan on $lun and + # $newsearch is the old $targetluns without $lun + if [ -z "$inlist" ]; then + # Stale lun + lunremove="$lunremove $lun" + fi + # $lun removed from $lunsearch (echo for whitespace cleanup) + targetluns=`echo $newsearch` + done + # Add new ones and check stale ones + for lun in $targetluns $lunremove; do + dolunscan $lun0added + done +} + +# Perform search (scan $host) +dosearch () +{ + if test -z "$channelsearch" ; then + chanlist + fi + for channel in $channelsearch; do + if test -z "$idsearch" ; then + idlist + fi + for id in $idsearch; do + if test -z "$lunsearch" ; then + doreportlun + else + for lun in $lunsearch; do + dolunscan + done + fi + done + done +} + +expandlist () +{ + list=$1 + result="" + first=${list%%,*} + rest=${list#*,} + while test ! -z "$first"; do + beg=${first%%-*}; + if test "$beg" = "$first"; then + result="$result $beg"; + else + end=${first#*-} + result="$result `seq $beg $end`" + fi + test "$rest" = "$first" && rest="" + first=${rest%%,*} + rest=${rest#*,} + done + echo $result +} + +# main +if test @$1 = @--help -o @$1 = @-h -o @$1 = @-?; then + echo "Usage: rescan-scsi-bus.sh [options] [host [host ...]]" + echo "Options:" + echo " -l activates scanning for LUNs 0--7 [default: 0]" + echo " -L NUM activates scanning for LUNs 0--NUM [default: 0]" + echo " -w scan for target device IDs 0--15 [default: 0--7]" + echo " -c enables scanning of channels 0 1 [default: 0 / all detected ones]" + echo " -r enables removing of devices [default: disabled]" + echo " -i issue a FibreChannel LIP reset [default: disabled]" + echo "--remove: same as -r" + echo "--issue-lip: same as -i" + echo "--forcerescan: Rescan existing devices" + echo "--forceremove: Remove and readd every device (DANGEROUS)" + echo "--nooptscan: don't stop looking for LUNs is 0 is not found" + echo "--color: use coloured prefixes OLD/NEW/DEL" + echo "--hosts=LIST: Scan only host(s) in LIST" + echo "--channels=LIST: Scan only channel(s) in LIST" + echo "--ids=LIST: Scan only target ID(s) in LIST" + echo "--luns=LIST: Scan only lun(s) in LIST" + echo "--sync/nosync: Issue a sync / no sync [default: sync if remove]" + echo "--attachpq3: Tell kernel to attach sg to LUN 0 that reports PQ=3" + echo "--reportlun2: Tell kernel to try REPORT_LUN even on SCSI2 devices" + echo "--largelun: Tell kernel to support LUNs > 7 even on SCSI2 devs" + echo "--sparselun: Tell kernel to support sparse LUN numbering" + echo " Host numbers may thus be specified either directly on cmd line (deprecated) or" + echo " or with the --hosts=LIST parameter (recommended)." + echo "LIST: A[-B][,C[-D]]... is a comma separated list of single values and ranges" + echo " (No spaces allowed.)" + exit 0 +fi + +if test ! -d /sys/class/scsi_host/ -a ! -d /proc/scsi/; then + echo "Error: SCSI subsystem not active" + exit 1 +fi + +# Make sure sg is there +modprobe sg >/dev/null 2>&1 + +if test -x /usr/bin/sg_inq; then + sg_version=$(sg_inq -V 2>&1 | cut -d " " -f 3) + sg_version=${sg_version##0.} + #echo "\"$sg_version\"" + #if [ -z "$sg_version" -o "$sg_version" -lt 70 ] ; then + #sg_len_arg="-36" + #else + sg_len_arg="--len=36" + #fi +else + echo "WARN: /usr/bin/sg_inq not present -- please install sg3_utils" + echo " or rescan-scsi-bus.sh might not fully work." +fi + +# defaults +unsetcolor +lunsearch= +opt_idsearch=`seq 0 7` +opt_channelsearch= +remove= +forceremove= +optscan=1 +sync=1 +declare -i scan_flags=0 +if test -d /sys/class/scsi_host; then + findhosts_26 +else + findhosts +fi + +# Scan options +opt="$1" +while test ! -z "$opt" -a -z "${opt##-*}"; do + opt=${opt#-} + case "$opt" in + l) lunsearch=`seq 0 7` ;; + L) lunsearch=`seq 0 $2`; shift ;; + w) opt_idsearch=`seq 0 15` ;; + c) opt_channelsearch="0 1" ;; + r) remove=1 ;; + i) lipreset=1 ;; + -remove) remove=1 ;; + -forcerescan) remove=1; forcerescan=1 ;; + -forceremove) remove=1; forceremove=1 ;; + -hosts=*) arg=${opt#-hosts=}; hosts=`expandlist $arg` ;; + -channels=*) arg=${opt#-channels=};opt_channelsearch=`expandlist $arg` ;; + -ids=*) arg=${opt#-ids=}; opt_idsearch=`expandlist $arg` ;; + -luns=*) arg=${opt#-luns=}; lunsearch=`expandlist $arg` ;; + -color) setcolor ;; + -nooptscan) optscan=0 ;; + -issue-lip) lipreset=1 ;; + -sync) sync=2 ;; + -nosync) sync=0 ;; + -attachpq3) scan_flags=$(($scan_flags|0x1000000)) ;; + -reportlun2) scan_flags=$(($scan_flags|0x20000)) ;; + -largelun) scan_flags=$(($scan_flags|0x200)) ;; + -sparselun) scan_flags=$((scan_flags|0x40)) ;; + *) echo "Unknown option -$opt !" ;; + esac + shift + opt="$1" +done + +# Hosts given ? +if test "@$1" != "@"; then + hosts=$* +fi + +if [ -d /sys/class/scsi_host -a ! -w /sys/class/scsi_host ]; then + echo "You need to run scsi-rescan-bus.sh as root" + exit 2 +fi +if test "$sync" = 1 -a "$remove" = 1; then sync=2; fi +if test "$sync" = 2; then echo "Syncing file systems"; sync; fi +if test -w /sys/module/scsi_mod/parameters/default_dev_flags -a $scan_flags != 0; then + OLD_SCANFLAGS=`cat /sys/module/scsi_mod/parameters/default_dev_flags` + NEW_SCANFLAGS=$(($OLD_SCANFLAGS|$scan_flags)) + if test "$OLD_SCANFLAGS" != "$NEW_SCANFLAGS"; then + echo -n "Temporarily setting kernel scanning flags from " + printf "0x%08x to 0x%08x\n" $OLD_SCANFLAGS $NEW_SCANFLAGS + echo $NEW_SCANFLAGS > /sys/module/scsi_mod/parameters/default_dev_flags + else + unset OLD_SCANFLAGS + fi +fi +echo "Scanning SCSI subsystem for new devices" +test -z "$remove" || echo " and remove devices that have disappeared" +declare -i found=0 +declare -i rmvd=0 +for host in $hosts; do + echo -n "Scanning host $host " + if test -e /sys/class/fc_host/host$host ; then + # It's pointless to do a target scan on FC + if test -n "$lipreset" ; then + echo 1 > /sys/class/fc_host/host$host/issue_lip 2> /dev/null; + udevadm_settle + fi + # We used to always trigger a rescan for FC to update channels and targets + # Commented out -- as discussed with Hannes we should rely + # on the main loop doing the scan, no need to do it here. + #echo "- - -" > /sys/class/scsi_host/host$host/scan 2> /dev/null; + #udevadm_settle + channelsearch= + idsearch= + else + channelsearch=$opt_channelsearch + idsearch=$opt_idsearch + fi + [ -n "$channelsearch" ] && echo -n "channels $channelsearch " + echo -n "for " + if [ -n "$idsearch" ] ; then + echo -n " SCSI target IDs " $idsearch + else + echo -n " all SCSI target IDs" + fi + if [ -n "$lunsearch" ] ; then + echo ", LUNs " $lunsearch + else + echo ", all LUNs" + fi + dosearch +done +if test -n "$OLD_SCANFLAGS"; then + echo $OLD_SCANFLAGS > /sys/module/scsi_mod/parameters/default_dev_flags +fi +echo "$found new device(s) found. " +echo "$rmvd device(s) removed. " + +# Local Variables: +# sh-basic-offset: 2 +# End: + diff --git a/source/installer/sources/initrd/scripts/network.sh b/source/installer/sources/initrd/scripts/network.sh new file mode 100644 index 000000000..499251c44 --- /dev/null +++ b/source/installer/sources/initrd/scripts/network.sh @@ -0,0 +1,155 @@ +#!/bin/sh + +# Remove extra whitespace +crunch() { + while read line ; do + echo $line + done +} + +echo +echo "******* Welcome to the network supplemental disk! *******" +echo + +# main loop: +while [ 0 ]; do + +echo "-- Press [enter] to automatically probe for all network cards, or switch" +echo " to a different console and use 'modprobe' to load the modules manually." +echo "-- To skip probing some modules (in case of hangs), enter them after an S:" +echo " S eepro100 ne2k-pci" +echo "-- To probe only certain modules, enter them after a P like this:" +echo " P 3c503 3c505 3c507" +echo "-- To get a list of network modules, enter an L." +echo "-- To skip the automatic probe entirely, enter a Q now." +echo + +# Clear "card found" flag: +rm -f /cardfound + +echo -n "network> " +read INPUT; +echo + +if [ "`echo $INPUT | crunch | cut -f 1 -d ' '`" = "L" \ + -o "`echo $INPUT | crunch | cut -f 1 -d ' '`" = "l" ]; then + echo "Available network modules:" + for file in /lib/modules/`uname -r`/kernel/drivers/net/* /lib/modules/`uname -r`/kernel/arch/i386/kernel/* /lib/modules/`uname -r`/kernel/drivers/pnp/* ; do + if [ -r $file ]; then + OUTPUT=`basename $file .gz` + OUTPUT=`basename $OUTPUT .o` + echo -n "$OUTPUT " + fi + done + echo + echo + continue +fi + +if [ ! "$INPUT" = "q" -a ! "$INPUT" = "Q" \ + -a ! "`echo $INPUT | crunch | cut -f 1 -d ' '`" = "P" \ + -a ! "`echo $INPUT | crunch | cut -f 1 -d ' '`" = "p" ]; then + echo "Probing for PCI/EISA network cards:" + for card in \ + 3c59x acenic de4x5 dgrs eepro100 e1000 e1000e e100 epic100 hp100 ne2k-pci olympic pcnet32 rcpci 8139too 8139cp tulip via-rhine r8169 atl1e sktr yellowfin tg3 dl2k ns83820 \ + ; do + SKIP="" + if [ "`echo $INPUT | crunch | cut -f 1 -d ' '`" = "S" \ + -o "`echo $INPUT | crunch | cut -f 1 -d ' '`" = "s" ]; then + for nogood in `echo $INPUT | crunch | cut -f 2- -d ' '` ; do + if [ "$card" = "$nogood" ]; then + SKIP=$card + fi + done + fi + if [ "$SKIP" = "" ]; then + echo "Probing for card using the $card module..." + modprobe $card 2> /dev/null + grep -q eth0 /proc/net/dev + if [ $? = 0 ]; then + echo + echo "SUCCESS: found card using $card protocol -- modules loaded." + echo "$card" > /cardfound + echo + break + else + modprobe -r $card 2> /dev/null + fi + else + echo "Skipping module $card..." + fi + done + echo + if [ ! -r /cardfound ]; then + # Don't probe for com20020... it loads on any machine with or without the card. + echo "Probing for MCA, ISA, and other PCI network cards:" + # removed because it needs an irq parameter: arlan + # tainted, no autoprobe: (arcnet) com90io com90xx + for card in depca ibmtr 3c501 3c503 3c505 3c507 3c509 3c515 ac3200 \ + acenic at1700 cosa cs89x0 de4x5 de600 \ + de620 e2100 eepro eexpress es3210 eth16i ewrk3 fmv18x forcedeth hostess_sv11 \ + hp-plus hp lne390 ne3210 ni5010 ni52 ni65 sb1000 sealevel smc-ultra \ + sis900 smc-ultra32 smc9194 wd ; do + SKIP="" + if [ "`echo $INPUT | crunch | cut -f 1 -d ' '`" = "S" \ + -o "`echo $INPUT | crunch | cut -f 1 -d ' '`" = "s" ]; then + for nogood in `echo $INPUT | crunch | cut -f 2- -d ' '` ; do + if [ "$card" = "$nogood" ]; then + SKIP=$card + fi + done + fi + if [ "$SKIP" = "" ]; then + echo "Probing for card using the $card module..." + modprobe $card 2> /dev/null + grep -q eth0 /proc/net/dev + if [ $? = 0 ]; then + echo + echo "SUCCESS: found card using $card protocol -- modules loaded." + echo "$card" > /cardfound + echo + break + else + modprobe -r $card 2> /dev/null + fi + else + echo "Skipping module $card..." + fi + done + echo + fi + if [ ! -r /cardfound ]; then + echo "Sorry, but no network card was detected. Some cards (like non-PCI" + echo "NE2000s) must be supplied with the I/O address to use. If you have" + echo "an NE2000, you can switch to another console (Alt-F2), log in, and" + echo "load it with a command like this:" + echo + echo " modprobe ne io=0x360" + echo + fi +elif [ "`echo $INPUT | crunch | cut -f 1 -d ' '`" = "P" \ + -o "`echo $INPUT | crunch | cut -f 1 -d ' '`" = "p" ]; then + echo "Probing for a custom list of modules:" + for card in `echo $INPUT | crunch | cut -f 2- -d ' '` ; do + echo "Probing for card using the $card module..." + modprobe $card 2> /dev/null + grep -q eth0 /proc/net/dev + if [ $? = 0 ]; then + echo + echo "SUCCESS: found card using $card protocol -- modules loaded." + echo "$card" > /cardfound + echo + break + else + modprobe -r $card 2> /dev/null + fi + done + echo +else + echo "Skipping automatic module probe." + echo +fi + +# end main loop +break +done diff --git a/source/installer/sources/initrd/tag/README b/source/installer/sources/initrd/tag/README new file mode 100644 index 000000000..39bf68cbf --- /dev/null +++ b/source/installer/sources/initrd/tag/README @@ -0,0 +1,5 @@ +This used to be a place to make custom tagfiles, but now it's just here as a +"non-standard directory" so that we have a good way to probe if we're running +off the rootdisk and not an installed system. We need to know this within +pkgtool when it's started up at a prompt so we know to emit some mounting +instructions. diff --git a/source/installer/sources/initrd/usr/bin/logger b/source/installer/sources/initrd/usr/bin/logger new file mode 100755 index 000000000..5aa972663 --- /dev/null +++ b/source/installer/sources/initrd/usr/bin/logger @@ -0,0 +1,6 @@ +#!/bin/bash +# os-prober fails if it can't call /usr/bin/logger, which we don't have on +# the installer since we don't keep logs there. Instead we'll just call +# /bin/true as a workaround. + +/bin/true diff --git a/source/installer/sources/initrd/usr/bin/man b/source/installer/sources/initrd/usr/bin/man new file mode 120000 index 000000000..7cfe33a2f --- /dev/null +++ b/source/installer/sources/initrd/usr/bin/man @@ -0,0 +1 @@ +../../bin/man
\ No newline at end of file diff --git a/source/installer/sources/initrd/usr/bin/zcat b/source/installer/sources/initrd/usr/bin/zcat new file mode 120000 index 000000000..b40211eb5 --- /dev/null +++ b/source/installer/sources/initrd/usr/bin/zcat @@ -0,0 +1 @@ +../../bin/zcat
\ No newline at end of file diff --git a/source/installer/sources/initrd/usr/lib/setup/FDhelp b/source/installer/sources/initrd/usr/lib/setup/FDhelp new file mode 100644 index 000000000..1c06d34e1 --- /dev/null +++ b/source/installer/sources/initrd/usr/lib/setup/FDhelp @@ -0,0 +1,256 @@ + +Slackware Linux Help +____________________ + +First, a little help on help. Whenever you encounter a text +viewer like this during the installation, you can move around +with these commands: + +PGDN/SPACE - Move down one page +PGUP/'b' - Move up one page +ENTER/DOWN/'j' - Move down one line +UP/'k' - Move up one line +LEFT/'h' - Scroll left +RIGHT/'l' - Scroll right +'0' - Move to beginning of line +HOME/'g' - Move to beginning of file +END/'G' - Move to end of file +'/' - Forward search +'?' - Backward search +'n' - Repeat last search (forward) + +Also, you're running a real multitasking operating system now, so +you're not confined to the installation program. You can log into +other consoles and look around at any time without disturbing the +installation process. To do this, you need to learn the commands +that control the Linux console. You'll use these commands all the +time when you're logged into Linux. + +"Virtual" consoles and scrollback: + +Right now, the screen you're looking at is probably VIRTUAL CONSOLE +NUMBER ONE, (or /dev/tty1 in Linux-speak). There are usually +several virtual consoles available. When you log into the install +disk, there are four consoles. To switch among them, use Alt-F1, +Alt-F2, Alt-F3, or Alt-F4 to select which of the four consoles you +wish to use. While you're using a console, you get a small amount +of text scrollback buffer. To scroll the console back, hold down +the right shift key and hit PageUp. To scroll the console forward, +hit PageDown while holding the right shift key down. This can be +especially useful for reading the boot messages, which can go by +too fast to read otherwise. + +On the install disk, the first three consoles are login consoles. +The fourth console is used to show informational messages during +installation, such as disk formatting status, kernel messages, and +so on. + +A useful trick is to log into the second virtual console during the +installation. Then you can use commands such as 'df' to check how +full your hard drive is getting. Also, once the Slackware CD-ROM +has been mounted on /cdrom, most of the commands in the disc's live +filesystem will be usable. + + +PARTITIONING YOUR DRIVE (MBR SYSTEMS) + +If you have a newer machine that uses GPT (all UEFI machines do), +or you wish to use GPT, skip to the section below on GPT PARTITIONING. + +Now lets take a look at how you progress through a typical Linux +installation with the Slackware distribution. First, you'll have +to make sure your hard drive has been partitioned to accept Linux. +The setup program does not do this for you. + +You will need at least one type Linux partition, and optionally a +swap partition. In my opinion, (if you have a fair amount of drive +space) it's easiest to manage a system that's partitioned along these +lines (ignoring any Windows or other partitions for the purposes +of this illustration): + + [ 8 gig or more for / ] + [ whatever space users need for /home ] + [ swap space (match the size of your RAM) ] + +Some people like a separate partition for /usr/local, but I find that +I usually regret dividing my free space when I don't have to... the +partition I want to add to is always full that way. :^) Besides, when +the time comes for an operating system upgrade you can always back up +/usr/local regardless of whether it occupies its own partition. In +fact, having a separate /home partition is also optional. Probably the +simplest way to approach things initially is with just a single root +Linux partition, and a swap partition of about 1-2 gigabytes. + +The amount of drive space you'll want to give Linux depends on what +software you plan to install, and how much space you have to spare. +My primary Linux partition is 23 gigabytes. If you've got that +kind of room to spare, it will make it easier to compile and try out +large pieces of software, or to work with large files such as might be +used in desktop publishing or CD-ROM mastering applications. + +The entire Slackware system (everything - all the X servers, Emacs, +the works) will use about 8 gigabytes of hard drive space, +so 10 - 15 gigs is sufficient for a complete installation. + +In the past, I've actually done development work on a single / +partition of 110 MB. (Of course, that was back in the days of Linux +version 0.99p11 or so...) Still, with careful selection you can still +squeeze a small Linux system onto a system, but this is not recommended +for beginners. It's more useful when utilizing Slackware as a base for +an embedded system. Most people should be going a full installation. +It's faster and easier, and less error-prone. + +Partitioning is done with a partitioning tool such as fdisk. There are +two versions of Linux fdisk available now. 'fdisk' is the standard +version, and 'cfdisk' is a friendlier full screen version. Most +people will probably want to use 'cfdisk' now, unless they're used +to the older version (like me). Either one will get the job done. + +Make sure you use Linux fdisk to tag partitions as type 83 (Linux, the +default) or type 82 (Linux swap) so the Slackware setup program will +recognize them. Use the 't' command for that, and 'w' to write out the +changes. + +If you prefer an easy to use graphical partitioning tool, you can make +all your Linux partitions directly from Linux 'cfdisk'. Or you can +make them with the older 'fdisk' using the 'n' command to create a +partition and the 'w' command to write out the changes when you're done. + +By default, 'fdisk' and 'cfdisk' will partition the first hard drive in +your machine, which is /dev/sda. To partition other drives, you'll +have to specify the drive to partition when you start 'cfdisk'. For +example, to partition the second IDE drive: + + # cfdisk /dev/sdb + + +SWAP SPACE + +If your machine doesn't have much memory, you might have already +learned how to activate a swap partition just to make it this far. +Normally you won't need to format or activate your swap space by +hand, but if you're installing on a machine with low memory you will +need to format and activate a swap partition to be able to install. +Once you've made the partition with fdisk, you need to use 'mkswap' +on it, and then activate it with 'swapon'. Checking the partition +table with 'fdisk -l', we see these lines: + + Device Boot Start End Blocks Id System +/dev/sda8 16650 16898 2000061 82 Linux swap + +So, the command to format would be: + + # mkswap /dev/sda8 + # sync + +And to activate it: + + # swapon /dev/sda8 + + +GPT PARTITIONING + +If you have a Windows partition that you'd like to keep and need to make +free space for Linux, boot the machine into Windows. Move the mouse into +the upper right corner, and select the search function (magnifying glass +icon). Enter diskmgmt.msc to start up the Disk Management tool. The disk +partitions will be displayed as a bar chart at the bottom of the window. +Mouse over the main Windows partition (probably the largest NTFS partition) +and right click to bring up a menu. Select "Shrink Volume..." from this +menu. Shrink the partition to make enough free space for Slackware's root, +swap, and other partitions. + +NOTE: Rather than creating true free space, this resizing operation may +leave the extra space in the form of a generic (but allocated) partition. +Take note of the size of the "free space". When it comes time to partition +on Linux, you may need to delete this partition to make actual free space +before you can install. + +If you are installing to a machine that has Windows installed, then you'll +already have an EFI System Partition (this is used to store boot files on +machines that use UEFI). To check this, you can use gdisk. We'll assume +that you'll be installing to /dev/sda. If you'll be installing to some other +device, use that in the command below. + +gdisk -l /dev/sda + +If you see a partition with Code EF00 listed, then you are good to go. +If not, you will need to make one. To do that, use cgdisk: + +cgdisk /dev/sda + +Select the free space from the menu using the up/down keys, and then select +"New" to make a new partition. Hit ENTER to accept the first sector. Then +enter 100M as the partition size. Give the new partition a hex code of EF00. +You make give the partition a name (such as "EFI System Partition"), or just +hit ENTER to use no name. A name is not required. + +At this point, you've got a GPT disk with an EFI System partition (with or +without Windows). The next step is to make the partitions for Linux. If +you're not already in cgdisk, start that up with "cgdisk /dev/sda" (or +whatever your install device is). Start by making a swap partition. A +good rule of thumb is to make the swap partition equal to the amount of RAM +in your machine. So, select the free space again, and then "New". Again, +hit ENTER to accept the default first sector for the new partition. Then, +enter an appropriate size, such as 2G. Enter the hex code for Linux swap, +which is 8200. Give the partition a name if you like. + +Make your root Linux partition (optionally if you leave some space you can make +any additional Linux partitions that you'll need). Select the free space, and +"New". Accept the default first sector by hitting ENTER. To make the +partition use the rest of the disk space, just hit ENTER again when asked for +a size. Or, you may choose a smaller size if you're planning to make more +Linux partitions. Hit ENTER to accept the default hex code, which is for a +Linux filesystem. Name the partition (if you like), or hit ENTER again. + +If you have any more free space and partitions to make, now is the time to +make them. + +When you're done, select "Write" to write the partition table changes to the +disk (verify by typing "yes" when prompted), hit a key to continue, and then +select "Quit" to leave cgdisk. + + +RUNNING THE SETUP PROGRAM + +Setup has quite a few options, which can be slightly confusing the +first time you look at the menu. It's not really that hard, though. +You just need to start at the top of the screen and work towards +the bottom through the menu options. When I install, I usually do +these options in order: + +ADDSWAP (set up my swapspace) +TARGET (set up my Linux/Windows partitions and /etc/fstab) +SOURCE (select the source location for the Slackware Linux + packages) +SELECT (pick the package categories to install) +INSTALL (install the software, generally with "full") +CONFIGURE (configure the newly installed system) + +Note that after I select the SWAP option, setup will allow me to +run through all of the other options without ever returning to the +main menu. + +I hope that these options will be mostly self-explanatory. Just read +the screen carefully as you install and you should do just fine. + + +REMAPPING YOUR KEYBOARD: + +KEYMAP: This option lets you remap your keyboard to one of the many +international maps provided with Linux. If you are using a US +keyboard, you can skip this option. + + +...WHEN YOU'RE DONE: + + +EXIT: This leaves Slackware Linux setup. + + +Have fun installing and running Linux! + +--- +Patrick Volkerding +volkerdi@slackware.com + diff --git a/source/installer/sources/initrd/usr/lib/setup/INCISO b/source/installer/sources/initrd/usr/lib/setup/INCISO new file mode 100755 index 000000000..e34076c0d --- /dev/null +++ b/source/installer/sources/initrd/usr/lib/setup/INCISO @@ -0,0 +1,31 @@ +# Determine if there is an ISO image to loop-mount: +check_iso_image () { + local IDIR=$1 + local MNTDIR=$2 + [ ! -d $IDIR ] && return 1 + [ -z "$MNTDIR" ] && MNTDIR=/var/log/mount + + IISO=$(ls --indicator-style=none "$IDIR"/slackwar*-install-dvd.iso 2>/dev/null |tail -1) + + if [ -n "$IISO" ]; then + cat << EOF > $TMP/tempmsg + +An ISO image of Slackware's install DVD was found. +Do you want me to mount the ISO image and use this as the package source? + +EOF + dialog --title "USE ISO IMAGE" --yesno "`cat $TMP/tempmsg`" 9 65 + RET=$? + if [ ! $RET = 0 ]; then + rm -f $TMP/tempmsg + return 1 + fi + + rm -f $TMP/tempmsg + umount -f $MNTDIR 2>/dev/null + mkdir -p $MNTDIR + mount -o loop,ro $IISO $MNTDIR + else + return 1 + fi +} diff --git a/source/installer/sources/initrd/usr/lib/setup/INSCD b/source/installer/sources/initrd/usr/lib/setup/INSCD new file mode 100755 index 000000000..42610aa18 --- /dev/null +++ b/source/installer/sources/initrd/usr/lib/setup/INSCD @@ -0,0 +1,270 @@ +#!/bin/sh +# FIXME: UDF fs support? +RDIR=/dev/tty4 +NDIR=/dev/null +TMP=/var/log/setup/tmp +if [ ! -d $TMP ]; then + mkdir -p $TMP +fi +T_PX="`cat $TMP/SeTT_PX`" +rm -f $TMP/SeTmount $TMP/SeTDS $TMP/SeTCDdev $TMP/reply + +dialog --title "SCANNING FOR CD or DVD DRIVE" --menu \ +"Make sure the Slackware disc is in your CD/DVD drive, \ +and then press ENTER to begin the scanning process. \ +Or, if you'd rather specify the device name manually \ +(experts only), choose that option below." \ +11 72 2 \ +"auto" "Scan for the CD or DVD drive (recommended)" \ +"manual" "Manually specify CD or DVD by device name" \ +2> $TMP/reply +if [ ! -r $TMP/reply ]; then + # cancel or esc + rm -f $TMP/SeTDS $TMP/SeTmount $TMP/SeTCDdev $TMP/errordo + exit +fi + +if [ "`cat $TMP/reply`" = "manual" ]; then + dialog --title "MANUAL CD/DVD DEVICE SELECTION" --menu \ + "Please select your CD/DVD device from the list below. \ +If you don't see your device listed, choose 'custom'. \ +This will let you type in any device name. (and if necessary, \ +will create the device)" \ + 18 70 9 \ + "custom" "Type in the CD or DVD device to use" \ + "/dev/sr0" "First CD/DVD drive" \ + "/dev/sr1" "Second CD/DVD drive" \ + "/dev/sr2" "Third CD/DVD drive" \ + "/dev/sr3" "Fourth CD/DVD drive" \ + "/dev/hdb" "CD/DVD slave on first IDE bus" \ + "/dev/hda" "CD/DVD master on first IDE bus (unlikely)" \ + "/dev/hdc" "CD/DVD master on second IDE bus" \ + "/dev/hdd" "CD/DVD slave on second IDE bus" \ + "/dev/hde" "CD/DVD master on third IDE bus" \ + "/dev/hdf" "CD/DVD slave on third IDE bus" \ + "/dev/hdg" "CD/DVD master on fourth IDE bus" \ + "/dev/hdh" "CD/DVD slave on fourth IDE bus" \ + "/dev/pcd0" "First parallel port ATAPI CD" \ + "/dev/pcd1" "Second parallel port ATAPI CD" \ + "/dev/pcd2" "Third parallel port ATAPI CD" \ + "/dev/pcd3" "Fourth parallel port ATAPI CD" \ + "/dev/aztcd" "Non-IDE Aztech CD/DVD" \ + "/dev/cdu535" "Sony CDU-535 CD/DVD" \ + "/dev/gscd" "Non-IDE GoldStar CD/DVD" \ + "/dev/sonycd" "Sony CDU-31a CD/DVD" \ + "/dev/optcd" "Optics Storage CD/DVD" \ + "/dev/sjcd" "Sanyo non-IDE CD/DVD" \ + "/dev/mcdx0" "Non-IDE Mitsumi drive 1" \ + "/dev/mcdx1" "Non-IDE Mitsumi drive 2" \ + "/dev/sbpcd" "Old non-IDE SoundBlaster CD/DVD" \ + "/dev/cm205cd" "Philips LMS CM-205 CD/DVD" \ + "/dev/cm206cd" "Philips LMS CM-206 CD/DVD" \ + "/dev/mcd" "Old non-IDE Mitsumi CD/DVD" \ + 2> $TMP/reply + if [ ! -r $TMP/reply ]; then + # cancel or esc + rm -f $TMP/SeTDS $TMP/SeTmount $TMP/SeTCDdev $TMP/errordo + exit + fi + REPLY="`cat $TMP/reply`" + if [ "$REPLY" = "custom" ]; then + dialog --title "ENTER CD/DVD DEVICE MANUALLY" --inputbox \ +"Please enter the name of the CD/DVD device (such as /dev/hdc) that \ +you wish to use to mount the Slackware CD/DVD:" \ +9 70 2> $TMP/reply + if [ ! -r $TMP/reply ]; then + # cancel or esc + rm -f $TMP/SeTDS $TMP/SeTmount $TMP/SeTCDdev $TMP/errordo + exit + fi + DRIVE_FOUND="`cat $TMP/reply`" + if [ ! -r $DRIVE_FOUND ]; then # no such device + rm -f $TMP/majorminor + dialog --title "MKNOD CD/DVD DEVICE" --inputbox \ + "There doesn't seem to be a device by the name of $DRIVE_FOUND in the \ +/dev directory, so we will have to create it using the major and minor \ +numbers for the device. If you're using a bootdisk with a custom CD/DVD \ +driver on it, you should be able to find these numbers in the \ +documentation. Also, see the 'devices.txt' file that comes with the \ +Linux kernel source. If you don't know the numbers, you'll have to hit \ +Esc to abort. Enter the major and minor numbers for the new device, \ +separated by one space:" \ + 15 72 2> $TMP/majorminor + if [ ! -r $TMP/majorminor ]; then + # cancel or esc + rm -f $TMP/SeTDS $TMP/SeTmount $TMP/SeTCDdev $TMP/errordo + exit + fi + MAJOR="`cat $TMP/majorminor`" + dialog --title "MAKING DEVICE IN /dev" --infobox \ + "mknod $DRIVE_FOUND b $MAJOR" 3 40 + mknod $DRIVE_FOUND b $MAJOR 2> $RDIR + sleep 1 + if [ ! -r $DRIVE_FOUND ]; then + dialog --title "MKNOD FAILED" --msgbox \ + "Sorry, but the mknod command failed to make the device. You'll need to \ +go back and try selecting your source media again. Press ENTER to abort \ +the source media selection process." 8 60 + rm -f $TMP/SeTDS $TMP/SeTmount $TMP/SeTCDdev $TMP/errordo + exit + fi + fi + else + DRIVE_FOUND=$REPLY + fi +fi + +# Search for SCSI/PATA/SATA CD/DVD drives: +if [ "$DRIVE_FOUND" = "" ]; then + dialog --title "SCANNING" --infobox "Scanning for a \ +CD/DVD drive containing a Slackware disc..." 4 50 + sleep 1 + for device in \ + /dev/sr0 /dev/sr1 /dev/sr2 /dev/sr3 \ + ; do + mount -o ro -t iso9660 $device /var/log/mount 1> $RDIR 2> $RDIR + if [ $? = 0 ]; then + DRIVE_FOUND=$device + umount /var/log/mount + break + fi + done +fi + +# Search the old IDE interfaces: +if [ "$DRIVE_FOUND" = "" ]; then + dialog --title "SCANNING" --infobox "Scanning for an IDE \ +CD/DVD drive containing a Slackware disc..." 4 56 + sleep 1 + for device in \ + /dev/hdd /dev/hdc /dev/hdb /dev/hda \ + /dev/hde /dev/hdf /dev/hdg /dev/hdh \ + /dev/hdi /dev/hdj /dev/hdk /dev/hdl \ + /dev/hdm /dev/hdn /dev/hdo /dev/hdp \ + ; do + mount -o ro -t iso9660 $device /var/log/mount 1> $RDIR 2> $RDIR + if [ $? = 0 ]; then + DRIVE_FOUND=$device + umount /var/log/mount + break + fi + done +fi + +# Search for parallel port ATAPI CD/DVD drives: +if [ "$DRIVE_FOUND" = "" ]; then + dialog --title "SCANNING" --infobox "Scanning for a parallel port \ +ATAPI CD/DVD drive containing a Slackware disc..." 4 52 + sleep 1 + for device in \ + /dev/pcd0 /dev/pcd1 /dev/pcd2 /dev/pcd3 \ + ; do + mount -o ro -t iso9660 $device /var/log/mount 1> $RDIR 2> $RDIR + if [ $? = 0 ]; then + DRIVE_FOUND=$device + umount /var/log/mount + break + fi + done +fi + +# Still not found? OK, we will search for CD/DVD drives on old, pre-ATAPI +# proprietary interfaces. There aren't too many of these still around, and +# the scan won't actually work unless a bootdisk that supports the drive is +# used, and any necessary parameters have been passed to the kernel. +if [ "$DRIVE_FOUND" = "" ]; then + dialog --title "SCANNING" --msgbox "No IDE/SCSI drive, so we will try \ +scanning for CD drives on \ +old proprietary interfaces, such as SoundBlaster pre-IDE CD drives, \ +Sony CDU-31a, Sony 535, old Mitsumi pre-IDE, old Optics, etc. For this \ +scan to work at all, you'll need to be using a bootdisk that supports \ +your CD drive. Please press ENTER to begin this last-chance scan \ +for old, obsolete hardware." 11 60 + for device in \ + /dev/sonycd /dev/gscd /dev/optcd /dev/sjcd /dev/mcdx0 /dev/mcdx1 \ + /dev/cdu535 /dev/sbpcd /dev/aztcd /dev/cm205cd /dev/cm206cd \ + /dev/bpcd /dev/mcd \ + ; do + mount -o ro -t iso9660 $device /var/log/mount 1> $RDIR 2> $RDIR + if [ $? = 0 ]; then + DRIVE_FOUND=$device + umount /var/log/mount + break + fi + done +fi + +if [ "$DRIVE_FOUND" = "" ]; then + dialog --title "CD/DVD DRIVE NOT FOUND" --msgbox \ + "A CD/DVD drive could not be found on any of the devices that were \ +scanned. Possible reasons include using a bootdisk or kernel that \ +doesn't support your drive, failing to pass parameters needed by some \ +drives to the kernel, not having the Slackware disc in your CD/DVD \ +drive, or using a drive connected to a Plug and Play soundcard (in this \ +case, connecting the drive directly to the IDE interface often helps). \ +Please make sure you are using the correct bootdisk for your hardware, \ +consult the BOOTING file for possible information on \ +forcing the detection of your drive, and then reattempt installation. \ +If all else fails, see FAQ.TXT for information about copying \ +parts of this CD to your DOS partition and installing it from there.\n\ +\n\ +You will now be returned to the main menu. If you want to try looking \ +for the CD again, you may skip directly to the SOURCE menu selection." \ + 0 0 + rm -f $TMP/SeTDS $TMP/SeTmount $TMP/SeTCDdev $TMP/errordo + exit +fi + +while [ 0 ]; do # time to try to mount the CD/DVD device: + mount -o ro -t iso9660 $DRIVE_FOUND /var/log/mount 1> $RDIR 2> $RDIR + if [ $? = 0 ]; then # mounted successfully + dialog --title "CD/DVD DRIVE FOUND" --sleep 1 --infobox \ + "A Slackware disc was found in device $DRIVE_FOUND." 3 52 + break + else # failed to mount + dialog --title "MOUNT ERROR" --menu "There was an error \ +attempting to mount the CD/DVD on $DRIVE_FOUND. \ +Maybe the device name is incorrect, the disc is not in the \ +drive, or the kernel you are using does not support the \ +device. (possibly an incorrect bootdisk) \ +What would you like to do now?" \ + 13 70 3 \ + "1" "Abort CD installation" \ + "2" "Attempt to mount the CD/DVD device again" \ + "3" "Ignore the error and continue" 2> $TMP/errordo + if [ ! $? = 0 ]; then + rm -f $TMP/SeTDS $TMP/SeTmount $TMP/SeTCDdev $TMP/errordo + exit; + fi + DOWHAT="`cat $TMP/errordo`" + rm -f $TMP/errordo + if [ $DOWHAT = 1 ]; then + rm -f $TMP/SeTDS $TMP/SeTmount $TMP/SeTCDdev + exit + elif [ $DOWHAT = 2 ]; then + dialog --title "ATTEMPTING TO MOUNT CD/DVD on $DRIVE_FOUND" \ + --infobox "Attempting to mount your CD/DVD again with the \ +following command: mount -o ro -t iso9660 $DRIVE_FOUND \ +/var/log/mount" 4 69 + umount /var/log/mount 1> $NDIR 2> $NDIR + sleep 1 + elif [ $DOWHAT = 3 ]; then + # Ignore error, really bad plan but whatever + break + fi + fi +done +# since we should have mounted successfully, let's refresh +# the link for /dev/cdrom on the target partition: +if [ ! -d $T_PX/dev ]; then + mkdir $T_PX/dev + chown root.root $T_PX/dev + chmod 755 $T_PX/dev +fi +( cd $T_PX/dev ; ln -sf $DRIVE_FOUND cdrom ) + +# Pass information about the source directory to the next install stage: +echo "/var/log/mount/slackware" > $TMP/SeTDS +echo "-source_mounted" > $TMP/SeTmount +echo "$DRIVE_FOUND" > $TMP/SeTCDdev +echo "/dev/null" > $TMP/SeTsource diff --git a/source/installer/sources/initrd/usr/lib/setup/INSNFS b/source/installer/sources/initrd/usr/lib/setup/INSNFS new file mode 100755 index 000000000..a353daa48 --- /dev/null +++ b/source/installer/sources/initrd/usr/lib/setup/INSNFS @@ -0,0 +1,121 @@ +#!/bin/sh +TMP=/var/log/setup/tmp +if [ ! -d $TMP ]; then + mkdir -p $TMP +fi +# Include function to check for Slackware ISO images: +. /usr/lib/setup/INCISO +if [ -f $TMP/Punattended ]; then + eval $(grep "^NFS_SERVER=" $TMP/Punattended) + eval $(grep "^NFS_ROOT=" $TMP/Punattended) +fi + +while [ 0 ]; do + rm -f $TMP/SeTDS $TMP/SeTmount $TMP/SeTsource $TMP/nfsout + UPNRUN=`cat $TMP/SeTupnrun 2> /dev/null` + + if [ "$REMOTE_IPADDR" = "" ]; then REMOTE_IPADDR=${NFS_SERVER}; fi + if [ "$REMOTE_PATH" = "" ]; then REMOTE_PATH=${NFS_ROOT}; fi + + cat << EOF > $TMP/tempmsg + +Good! We're all set on the local end, but now we need to know +where to find the software packages to install. First, we need +the IP address of the machine where the Slackware sources are +stored. + +EOF + if [ "$UPNRUN" = "0" ]; then + cat << EOF >> $TMP/tempmsg +Since you're already running on the network, you should be able +to use the hostname instead of an IP address if you wish. + +EOF + fi + echo "What is the IP address of your NFS server? " >> $TMP/tempmsg + dialog --title "ENTER IP ADDRESS OF NFS SERVER" --inputbox \ + "`cat $TMP/tempmsg`" 14 70 $REMOTE_IPADDR 2> $TMP/remote + if [ ! $? = 0 ]; then + rm -f $TMP/tempmsg $TMP/remote + exit + fi + REMOTE_IPADDR="`cat $TMP/remote`" + rm $TMP/remote + + cat << EOF > $TMP/tempmsg + + There must be a directory on the server with the Slackware + packages and files arranged in a tree like the FTP site. + + The installation script needs to know the name of the + directory on your server that contains the series' + subdirectories. For example, if your A series is found at + /slack/slackware/a, then you would respond: /slack/slackware + + What is the Slackware source directory? +EOF + dialog --title "SELECT SOURCE DIRECTORY" --inputbox "`cat $TMP/tempmsg`" 18 \ + 65 $REMOTE_PATH 2> $TMP/slacksrc + if [ ! $? = 0 ]; then + rm -f $TMP/tempmsg $TMP/slacksrc + exit + fi + REMOTE_PATH="`cat $TMP/slacksrc`" + rm $TMP/slacksrc + cat << EOF > $TMP/tempmsg + +In the next screen you should watch for NFS mount errors. +If you see errors and you don't see your NFS server listed, +then try setting up NFS again. + +EOF + dialog --title "NFS MOUNT INFORMATION" --msgbox "`cat $TMP/tempmsg`" 10 65 + rm -f $TMP/tempmsg + touch $TMP/nfsout + if [ ! "$UPNRUN" = "0" ]; then + if [ -x /etc/rc.d/rc.rpc ]; then + echo "Starting RPC services..." >> $TMP/nfsout + /etc/rc.d/rc.rpc restart >> $TMP/nfsout 2>&1 + fi + fi + echo "Mounting $REMOTE_PATH:" >> $TMP/nfsout + echo "mount -r -t nfs -o vers=3 $REMOTE_IPADDR:$REMOTE_PATH /var/log/mount" >> $TMP/nfsout + mount -r -t nfs -o vers=3 $REMOTE_IPADDR:$REMOTE_PATH /var/log/mount + if [ ! $? = 0 ]; then + echo "Didn't work." >> $TMP/nfsout + echo "Maybe you should check that the directory name is correct?" >> $TMP/nfsout + DEFANSW="yes" + else + DEFANSW="no" + fi + echo "" >> $TMP/nfsout + echo "Current NFS mounts:" >> $TMP/nfsout + mount -t nfs >> $TMP/nfsout 2>&1 + echo "" >> $TMP/nfsout + + echo "Do you need to try setting up NFS again?" >> $TMP/nfsout + echo "" >> $TMP/nfsout + if [ "$DEFANSW" = "no" ]; then + dialog --title "NFS MOUNT RESULT" \ + --defaultno --yesno "`cat $TMP/nfsout`" 21 70 + RET=$? + else + dialog --title "NFS MOUNT RESULT" --yesno "`cat $TMP/nfsout`" 21 70 + RET=$? + fi + rm -f $TMP/nfsout + if [ $RET = 1 ]; then + # OK with the NFS mount. + # First, check if a Slackware ISO image is present in /var/log/mount + if check_iso_image /var/log/mount /var/log/mntiso ; then + echo "/var/log/mntiso/slackware" > $TMP/SeTDS + elif [ -r /var/log/mount/slackware/PACKAGES.TXT ]; then + echo "/var/log/mount/slackware" > $TMP/SeTDS + else + echo "/var/log/mount" > $TMP/SeTDS + fi + echo "-source_mounted" > $TMP/SeTmount + echo "/dev/null" > $TMP/SeTsource + break + fi +done diff --git a/source/installer/sources/initrd/usr/lib/setup/INSSMB b/source/installer/sources/initrd/usr/lib/setup/INSSMB new file mode 100755 index 000000000..ae4aac887 --- /dev/null +++ b/source/installer/sources/initrd/usr/lib/setup/INSSMB @@ -0,0 +1,120 @@ +#!/bin/sh +TMP=/var/log/setup/tmp +if [ ! -d $TMP ]; then + mkdir -p $TMP +fi +if [ -f $TMP/Punattended ]; then + eval $(grep "^SMB_SERVER=" $TMP/Punattended) + eval $(grep "^SMB_ROOT=" $TMP/Punattended) +fi + +if [ "$REMOTE_SHARE" = "" ]; then REMOTE_SHARE=${SMB_SERVER}; fi +if [ "$REMOTE_PATH" = "" ]; then REMOTE_PATH=${SMB_ROOT}; fi + +# Load the cifs module: +modprobe cifs 2>/dev/null + +while [ 0 ]; do + rm -f $TMP/SeTDS $TMP/SeTmount + UPNRUN=`cat $TMP/SeTupnrun` + + cat << EOF > $TMP/tempmsg + +Good! We're all set on the local end, but now we need to know +where to find the software packages to install. First, we need +the share address of the Samba server where the Slackware sources +are stored. +Example share address: //192.168.0.1/public + +EOF + if [ "$UPNRUN" = "0" ]; then + cat << EOF >> $TMP/tempmsg +Since you're already running on the network, you should be able +to use the hostname instead of an IP address if you wish. + +EOF + fi + echo "What is the share address of your Samba server? " >> $TMP/tempmsg + dialog --title "ENTER SHARE ADDRESS OF SAMBA SERVER" --inputbox \ + "`cat $TMP/tempmsg`" 15 70 $REMOTE_SHARE 2> $TMP/remote + if [ ! $? = 0 ]; then + rm -f $TMP/tempmsg $TMP/remote + exit + fi + REMOTE_SHARE="`cat $TMP/remote`" + rm $TMP/remote + + cat << EOF > $TMP/tempmsg + + There must be a directory on the server with the Slackware + packages and files arranged in a tree like the FTP site. + + The installation script needs to know the name of the + directory below your Samba share that contains the series + subdirectories. For example, if your A series is found at + /slack/slackware/a, then you would respond: /slack/slackware + + What is the Slackware source directory? +EOF + dialog --title "SELECT SOURCE DIRECTORY" --inputbox "`cat $TMP/tempmsg`" \ + 17 70 $REMOTE_PATH 2> $TMP/slacksrc + if [ ! $? = 0 ]; then + rm -f $TMP/tempmsg $TMP/slacksrc + exit + fi + REMOTE_PATH="`cat $TMP/slacksrc`" + rm $TMP/slacksrc + + echo "You should see no mount errors:" > $TMP/mntout + echo "Mounting $REMOTE_SHARE ..." >> $TMP/mntout + mount -t cifs -o ro,guest,sec=none $REMOTE_SHARE /var/log/mount \ + >> $TMP/mntout 2>&1 + RET=$? + if [ $RET != 0 ]; then + echo "Mount failed." >> $TMP/mntout + umount -f -t cifs /var/log/mount 1>/dev/null 2>&1 + DEFANSW="yes" + else + echo "Mounted Samba share(s):" >> $TMP/mntout + mount -t cifs >> $TMP/mntout 2>/dev/null + echo "" >> $TMP/mntout + if [ -f /var/log/mount/$REMOTE_PATH/a/tagfile \ + -o -f /var/log/mount/$REMOTE_PATH/slackware/a/tagfile ]; + then + echo "A Slackware package tree was found! Ready to continue." >> $TMP/mntout + DEFANSW="no" + else + echo "No Slackware package tree found at the indicated path!" >> $TMP/mntout + DEFANSW="yes" + fi + fi + echo "" >> $TMP/mntout + echo "Do you want to try setting up Samba again?" >> $TMP/mntout + echo "" >> $TMP/mntout + if [ "$DEFANSW" = "no" ]; then + dialog --title "MOUNT RESULT" \ + --defaultno --yesno "`cat $TMP/mntout`" 17 70 + RET=$? + else + dialog --title "MOUNT RESULT" \ + --yesno "`cat $TMP/mntout`" 12 68 + RET=$? + fi + if [ $RET = 1 ]; then + rm -f $TMP/mntout + break + fi + rm -f $TMP/mntout + #if [ "$UPNRUN" = "1" ]; then + # route del $LOCAL_NETWORK + # ifconfig $ENET_DEVICE down + #fi +done + +if [ -f /var/log/mount/$REMOTE_PATH/a/tagfile ]; then + echo "/var/log/mount/$REMOTE_PATH" > $TMP/SeTDS +else + echo "/var/log/mount/${REMOTE_PATH}/slackware" > $TMP/SeTDS +fi +echo "-source_mounted" > $TMP/SeTmount +echo "/dev/null" > $TMP/SeTsource diff --git a/source/installer/sources/initrd/usr/lib/setup/INSURL b/source/installer/sources/initrd/usr/lib/setup/INSURL new file mode 100755 index 000000000..4423406bc --- /dev/null +++ b/source/installer/sources/initrd/usr/lib/setup/INSURL @@ -0,0 +1,241 @@ +#!/bin/sh +TMP=/var/log/setup/tmp +if [ ! -d $TMP ]; then + mkdir -p $TMP +fi +if [ -f $TMP/Punattended ]; then + eval $(grep "^REMOTE_URL=" $TMP/Punattended) + eval $(grep "^REMOTE_PATH=" $TMP/Punattended) +fi + +# Return a package name that has been stripped of the dirname portion +# and any of the valid extensions (only): +pkgbase() { + PKGEXT=$(echo $1 | rev | cut -f 1 -d . | rev) + case $PKGEXT in + 'tgz' ) + PKGRETURN=$(basename $1 .tgz) + ;; + 'tbz' ) + PKGRETURN=$(basename $1 .tbz) + ;; + 'tlz' ) + PKGRETURN=$(basename $1 .tlz) + ;; + 'txz' ) + PKGRETURN=$(basename $1 .txz) + ;; + *) + PKGRETURN=$(basename $1) + ;; + esac + echo $PKGRETURN +} + +package_name() { + STRING=$(pkgbase $1) + # Check for old style package name with one segment: + if [ "$(echo $STRING | cut -f 1 -d -)" = "$(echo $STRING | cut -f 2 -d -)" ]; then + echo $STRING + else # has more than one dash delimited segment + # Count number of segments: + INDEX=1 + while [ ! "$(echo $STRING | cut -f $INDEX -d -)" = "" ]; do + INDEX=$(expr $INDEX + 1) + done + INDEX=$(expr $INDEX - 1) # don't include the null value + # If we don't have four segments, return the old-style (or out of spec) package name: + if [ "$INDEX" = "2" -o "$INDEX" = "3" ]; then + echo $STRING + else # we have four or more segments, so we'll consider this a new-style name: + NAME=$(expr $INDEX - 3) + NAME="$(echo $STRING | cut -f 1-$NAME -d -)" + echo $NAME + fi + fi +} + +while [ 0 ]; do + rm -f $TMP/SeTDS $TMP/SeTmount + UPNRUN=$(cat $TMP/SeTupnrun) + + cat << EOF > $TMP/tempmsg + +Good! We're all set on the local end, but now we need to know +where to find the software packages to install. First, we need +the URL of the ftp or http server where the Slackware sources +are stored. +URL examples are: 'ftp://192.168.0.1' ; 'http://172.16.10.31' + +EOF + if [ "$UPNRUN" = "0" ]; then + cat << EOF >> $TMP/tempmsg +Since you're already running on the network, you should be able +to use the hostname instead of an IP address if you wish. + +EOF + fi + echo "What is the URL of your FTP/HTTP server? " >> $TMP/tempmsg + dialog --title "ENTER URL OF FTP/HTTP SERVER" --inputbox \ + "$(cat $TMP/tempmsg)" 15 70 $REMOTE_URL 2> $TMP/remote + if [ ! $? = 0 ]; then + rm -f $TMP/tempmsg $TMP/remote + exit + fi + REMOTE_URL="$(cat $TMP/remote)" + rm $TMP/remote + + cat << EOF > $TMP/tempmsg + + There must be a directory on the server with the Slackware + packages and files arranged in a tree like the FTP site. + + The installation script needs to know the name of the + directory on your server that contains the series + subdirectories. For example, if your A series is found at + /slack/slackware/a, then you would respond: /slack/slackware + + What is the Slackware source directory? +EOF + dialog --title "SELECT SOURCE DIRECTORY" --inputbox "$(cat $TMP/tempmsg)" \ + 17 65 $REMOTE_PATH 2> $TMP/slacksrc + if [ ! $? = 0 ]; then + rm -f $TMP/tempmsg $TMP/slacksrc + exit + fi + REMOTE_PATH="$(cat $TMP/slacksrc)" + rm $TMP/slacksrc + + cat << EOF > $TMP/tempmsg + +In the next screen you should watch for possible errors. + +First, we'll download the PACKAGES.TXT from the parent of the +directory that you entered before (which should be the root +of the remote Slackware tree). If that succeeds, then we use +PACKAGES.TXT to reconstruct a local cache of the package tree +(should take a minute or less on an average system). +After that, we're all set to go! + +Downloading PACKAGES.TXT at the Slackware root starts +after you press OK. +That file is several hundreds of KB in size so it may +take some time to get here... + +EOF + dialog --title "DOWNLOAD INFORMATION" --msgbox "$(cat $TMP/tempmsg)" 20 70 + rm -f $TMP/tempmsg + + REMOTE_ROOT=$(dirname $REMOTE_PATH) + mkdir -p $TMP/treecache 2>/dev/null + chmod 700 $TMP/treecache + rm -rf $TMP/treecache/* 2>/dev/null + ln -sf $TMP/treecache /var/log/mount/ + cd /var/log/mount/treecache + echo "Downloading PACKAGES.TXT ..." >> $TMP/wgetout + echo "URL: $REMOTE_URL$REMOTE_ROOT" > $TMP/wgetout + wget -q $REMOTE_URL$REMOTE_ROOT/PACKAGES.TXT > /dev/null 2>&1 + RET=$? + if [ $RET != 0 ]; then + echo "> Download failed. Going to try one directory lower." >> $TMP/wgetout + REMOTE_ROOT=$REMOTE_PATH + echo "URL: $REMOTE_URL$REMOTE_ROOT" >> $TMP/wgetout + wget -q $REMOTE_URL$REMOTE_ROOT/PACKAGES.TXT > /dev/null 2>&1 + RET=$? + [ $RET != 0 ] && echo "> Download failed again." >> $TMP/wgetout + fi + echo "" >> $TMP/wgetout + + if [ -r /var/log/mount/treecache/PACKAGES.TXT ]; then + if head /var/log/mount/treecache/PACKAGES.TXT | grep -q "PACKAGES.TXT" ; then + echo "A Slackware 'PACKAGES.TXT' is available. Ready to continue!" >> $TMP/wgetout + DEFANSW="no" + fi + else + echo "No file 'PACKAGES.TXT' was found. Wrong URL?" >> $TMP/wgetout + DEFANSW="yes" + fi + echo "" >> $TMP/wgetout + echo "Do you want to try setting up FTP/HTTP again?" >> $TMP/wgetout + echo "" >> $TMP/wgetout + if [ "$DEFANSW" = "no" ]; then + dialog --title "DOWNLOAD RESULT" \ + --defaultno --yesno "$(cat $TMP/wgetout)" 12 68 + RET=$? + else + dialog --title "DOWNLOAD RESULT" \ + --yesno "$(cat $TMP/wgetout)" 12 68 + RET=$? + fi + if [ $RET = 1 ]; then + rm -f $TMP/wgetout + break + fi + rm -f $TMP/wgetout + #if [ "$UPNRUN" = "1" ]; then + # route del $LOCAL_NETWORK + # ifconfig $ENET_DEVICE down + #fi +done + +if [ -r /var/log/mount/treecache/PACKAGES.TXT ]; then + echo "/var/log/mount/treecache/slackware" > $TMP/SeTDS + echo "-source_mounted" > $TMP/SeTmount + echo "/dev/null" > $TMP/SeTsource + echo "${REMOTE_URL},${REMOTE_ROOT}" > $TMP/SeTremotesvr + + dialog --title "INITIALIZING PACKAGE TREE" --infobox \ + "\nSetting up local cache for the FTP/HTTP server's package tree ..." 5 72 + + mkdir slackware isolinux 2>/dev/null + wget -q -P ./isolinux $REMOTE_URL$REMOTE_ROOT/isolinux/setpkg + + # Create a local package tree with zero-byte package placeholders: + TOTALP=$(grep "PACKAGE NAME:" PACKAGES.TXT | wc -l) + ( + NUMPKG=0 + GAUGE=0 + grep "PACKAGE " PACKAGES.TXT | while read REPLY ; do + case "$REPLY" in + "PACKAGE NAME:"*) + TEMP=$(echo $REPLY | cut -d: -f2) + PKGNAME=$(echo $TEMP) + PKGBASE=$(pkgbase $PKGNAME) + PKGSHRT=$(package_name $PKGNAME) + let NUMPKG=NUMPKG+1 + if [ $(( ((100 * $NUMPKG)/$TOTALP)/5 )) -gt $(( $GAUGE/5 )) ]; then + GAUGE=$(( (100 * $NUMPKG)/$TOTALP )) + echo "$GAUGE" + fi + ;; + "PACKAGE LOCATION:"*) + TEMP=$(echo $REPLY | cut -d: -f2) + PKGDIR=$(echo $TEMP) + mkdir -p $PKGDIR + touch ${PKGDIR}/${PKGNAME} + ;; + "PACKAGE SIZE (compressed):"*) + TEMP=$(echo $REPLY | cut -d: -f2) + PKGSIZE=$(echo $TEMP) + echo "$PKGSIZE" 1> ${PKGDIR}/${PKGBASE}.size + ;; + *) + ;; + esac + done \ + ) | dialog --title "INITIALIZING PACKAGE TREE" --gauge \ + "\nProcessing ${TOTALP} Slackware packages..." 8 65 + + # Make sure we can select stuff from the package series: + dialog --title "INITIALIZING PACKAGE TREE" --infobox \ + "\nRetrieving tagfile information for the package tree ..." 5 65 + + for series in $(ls -1 slackware) ; do + wget -q -P ./slackware/$series $REMOTE_URL$REMOTE_ROOT/slackware/$series/tagfile + wget -q -P ./slackware/$series $REMOTE_URL$REMOTE_ROOT/slackware/$series/maketag.ez + wget -q -P ./slackware/$series $REMOTE_URL$REMOTE_ROOT/slackware/$series/maketag + done +else + dialog --title "REMOTE SERVER CONFIGURATION" --msgbox \ + "\nFailed to configure for installation from remote server." 5 65 +fi diff --git a/source/installer/sources/initrd/usr/lib/setup/INSUSB b/source/installer/sources/initrd/usr/lib/setup/INSUSB new file mode 100755 index 000000000..04723159c --- /dev/null +++ b/source/installer/sources/initrd/usr/lib/setup/INSUSB @@ -0,0 +1,107 @@ +#!/bin/sh +RDIR=/dev/tty4 +NDIR=/dev/null +TMP=/var/log/setup/tmp +if [ ! -d $TMP ]; then + mkdir -p $TMP +fi +T_PX="`cat $TMP/SeTT_PX`" +rm -f $TMP/SeTmount $TMP/SeTDS $TMP/SeTCDdev $TMP/reply + +dialog --title "SCANNING FOR USB STICK" --msgbox \ +"Make sure the USB stick containing the Slackware package directory \ +is inserted into a USB port, and then press ENTER to begin the scanning process." \ +7 66 \ +2> $TMP/reply +if [ ! -r $TMP/reply ]; then + # cancel or esc + rm -f $TMP/SeTDS $TMP/SeTmount $TMP/SeTCDdev $TMP/errordo + exit +fi + +dialog --infobox "\nScanning for USB stick..." 5 30 + +# Run "rescan-scsi-bus -l" to get an up to date overview of devices: +/sbin/rescan-scsi-bus -l 1>$RDIR 2>$RDIR + +# Generate a list of removable devices: +REMOVABLE_DEVICES="" +for BDEV in $(ls --indicator-style none /sys/block | grep -E -v "loop|ram|^dm-|^sr|^md"); do + if [ -r /sys/block/$BDEV/removable -a "$(cat /sys/block/$BDEV/removable)" == "1" ]; then + REMOVEABLE_DEVICES="$REMOVEABLE_DEVICES $BDEV" + fi +done + +if [ "$REMOVEABLE_DEVICES" = "" ]; then + dialog --title "NO REMOVABLE USB DEVICES FOUND" --msgbox \ +"Sorry, but no removable USB devices could be found. Exiting back to the top menu." \ +6 55 + rm -f $TMP/SeTDS $TMP/SeTmount $TMP/SeTCDdev $TMP/errordo + exit +fi + +# Make a mount location for the USB source: +mkdir -p /usb-stick +# Try to unmount it, just in case something strange is going on: +umount /usb-stick 1> /dev/null 2> /dev/null + +# First, we will look for partitions on the USB stick. Not knowing whether the stick is +# partitioned with MBR or GPT partitions (or indeed at all), we'll test for partitions +# 1 through 4. Probably very few people will try to use a stick with the Slackware +# packages in a directory on partition 5 or higher. If they do, it won't work. Sorry. +unset DRIVE_FOUND INSTALL_PATH +for DEVICE in $REMOVEABLE_DEVICES ; do + for PARTITION in 1 2 3 4 ; do + mount /dev/$DEVICE$PARTITION /usb-stick 1> /dev/null 2> /dev/null + if [ -d /usb-stick/slackware/a ]; then + DRIVE_FOUND="/dev/$DEVICE$PARTITION" + INSTALL_PATH="/usb-stick/slackware" + break + fi + if [ -d /usb-stick/slackware*-*/slackware/a ]; then + DRIVE_FOUND="/dev/$DEVICE$PARTITION" + INSTALL_PATH=$(echo /usb-stick/slackware*-*/slackware) + break + fi + umount /usb-stick 1> /dev/null 2> /dev/null + done +done + +# Next, we will try mounting the devices as unpartitioned if nothing has been found yet: +if [ "$DRIVE_FOUND" = "" ]; then + for DEVICE in $REMOVEABLE_DEVICES ; do + mount /dev/$DEVICE /usb-stick 1> /dev/null 2> /dev/null + if [ -d /usb-stick/slackware/a ]; then + DRIVE_FOUND="/dev/$DEVICE" + INSTALL_PATH="/usb-stick/slackware" + break + fi + if [ -d /usb-stick/slackware*-*/slackware/a ]; then + DRIVE_FOUND="/dev/$DEVICE$PARTITION" + INSTALL_PATH=$(echo /usb-stick/slackware*-*/slackware) + break + fi + done +fi + +if [ "$DRIVE_FOUND" = "" ]; then + dialog --title "NO SLACKWARE DIRECTORY FOUND" --msgbox \ +"Sorry, but a Slackware directory could not be found on any USB devices. \ +Exiting back to the top menu." \ +6 55 + rm -f $TMP/SeTDS $TMP/SeTmount $TMP/SeTCDdev $TMP/errordo + exit +fi + +# Success! Report back to the console: + +dialog --title "USB PACKAGE SOURCE FOUND" --sleep 1 --infobox \ +"A Slackware package directory was found on device $DRIVE_FOUND." 3 66 + +# At this point, the stick has been found and is mounted on /usb-stick. +# All that remains is to tell the installer about it, and we're done here. + +echo $INSTALL_PATH > $TMP/SeTDS +echo "-source_mounted" > $TMP/SeTmount +echo "/dev/null" > $TMP/SeTsource + diff --git a/source/installer/sources/initrd/usr/lib/setup/INSdir b/source/installer/sources/initrd/usr/lib/setup/INSdir new file mode 100755 index 000000000..cc9b1711a --- /dev/null +++ b/source/installer/sources/initrd/usr/lib/setup/INSdir @@ -0,0 +1,73 @@ +#!/bin/sh +TMP=/var/log/setup/tmp +T_PX="`cat $TMP/SeTT_PX`" +if [ ! -d $TMP ]; then + mkdir -p $TMP +fi +# Include function to check for Slackware ISO images: +. /usr/lib/setup/INCISO +while [ 0 ]; do +rm -f $TMP/SeTDS $TMP/SeTmount +# OK, at this point /var/log/mount should not have anything mounted on it, +# but we will umount just in case. +umount /var/log/mount 2> /dev/null +# Anything mounted on /var/log/mount now is a fatal error: +if mount | grep /var/log/mount 1> /dev/null 2> /dev/null ; then + echo "Can't umount /var/log/mount. Reboot machine and run setup again." + exit +fi +# If the mount table is corrupt, the above might not do it, so we will +# try to detect Linux and FAT32 partitions that have slipped by: +if [ -d /var/log/mount/lost+found -o -d /var/log/mount/recycled \ + -o -r /var/log/mount/io.sys ]; then + echo "Mount table corrupt. Reboot machine and run setup again." + exit +fi +cat << EOF > $TMP/tempmsg + +OK, we will install from a directory within the current +filesystem. If you have mounted this directory yourself, +you should not use ${T_PX} or /var/log/mount as mount points, +since Setup might need to use these directories. You may +install from any part of the current directory structure, +no matter what the media is (including NFS). You will need +to type in the name of the directory containing the +subdirectories for each source disk. + +Which directory would you like to install from? +EOF +dialog --title "INSTALL FROM THE CURRENT FILESYSTEM" \ + --inputbox "`cat $TMP/tempmsg`" 19 67 2> $TMP/sourcedir +if [ ! $? = 0 ]; then + rm -f $TMP/sourcedir $TMP/tempmsg + exit +fi +SOURCEDIR="`cat $TMP/sourcedir`" +rm -f $TMP/sourcedir $TMP/tempmsg +mkdir -p /var/log/mount +# First, check if a Slackware ISO image is present in $SOURCEDIR +if check_iso_image $SOURCEDIR ; then + echo "/var/log/mount/slackware" > $TMP/SeTDS +else + rm -f /var/log/mount 2> /dev/null + rmdir /var/log/mount 2> /dev/null + ln -sf $SOURCEDIR /var/log/mount + echo "/var/log/mount" > $TMP/SeTDS +fi +echo "-source_mounted" > $TMP/SeTmount +echo "/dev/null" > $TMP/SeTsource +if [ ! -d $SOURCEDIR ]; then + cat << EOF > $TMP/tempmsg + +Sorry - the directory you specified is not valid. Please +check the directory and try again. + +(Directory given: $SOURCEDIR) + +EOF + dialog --title "INVALID DIRECTORY ENTERED" --msgbox "`cat $TMP/tempmsg`" 10 65 + rm -f $TMP/SeTDS $TMP/SeTmount $TMP/SeTsource $TMP/sourcedir $TMP/tempmsg +else + exit +fi +done; diff --git a/source/installer/sources/initrd/usr/lib/setup/INShd b/source/installer/sources/initrd/usr/lib/setup/INShd new file mode 100755 index 000000000..ce30cb2f6 --- /dev/null +++ b/source/installer/sources/initrd/usr/lib/setup/INShd @@ -0,0 +1,146 @@ +#!/bin/sh +TMP=/var/log/setup/tmp +if [ ! -d $TMP ]; then + mkdir -p $TMP +fi +# Include function to check for Slackware ISO images: +. /usr/lib/setup/INCISO +while [ 0 ]; do +rm -f $TMP/SeTDS $TMP/SeTmount $TMP/SeTsource +# OK, at this point /var/log/mount should not have anything mounted on it, +# but we will umount just in case. +umount /var/log/mount 2> /dev/null +# Anything mounted on /var/log/mount now is a fatal error: +if mount | grep /var/log/mount 1> /dev/null 2> /dev/null ; then + echo "Can't umount /var/log/mount. Reboot machine and run setup again." + exit +fi +# If the mount table is corrupt, the above might not do it, so we will +# try to detect Linux and FAT32 partitions that have slipped by: +if [ -d /var/log/mount/lost+found -o -d /var/log/mount/recycled \ + -o -r /var/log/mount/io.sys ]; then + echo "Mount table corrupt. Reboot machine and run setup again." + exit +fi + +while [ 0 ]; do + cat << EOF > $TMP/tempmsg +In order to install directly from the hard disk you must have a +partition (such as /dev/sda1, /dev/sdb5, etc) with the Slackware +distribution's slackware/ directory like you'd find it on the FTP +site. It can be in another directory. For example, if the +distribution is in /stuff/slackware/, then you have to have +directories named /stuff/slackware/a, /stuff/slackware/ap, and so +on each containing the files that would be in that directory on +the FTP site. You may install from FAT or Linux partitions. + +Please enter the partition (such as /dev/sda1) where the Slackware +sources can be found, or [enter] to see a partition list: +EOF + dialog --title "INSTALLING FROM HARD DISK" --inputbox \ +"`cat $TMP/tempmsg`" 18 70 2> $TMP/source.part + if [ ! $? = 0 ]; then + rm -f $TMP/source.part $TMP/tempmsg + exit + fi + rm -f $TMP/tempmsg + SLACK_DEVICE="`cat $TMP/source.part`" + rm -f $TMP/source.part + if [ "$SLACK_DEVICE" = "" ]; then + dialog --title "PARTITION LIST" --no-collapse --msgbox "`probe -l | grep -v cylind | grep dev | sort 2> /dev/null`" 22 75 + continue; + fi + break; +done + +dialog --title "SELECT SOURCE DIRECTORY" --inputbox \ +"Now we need to know the full path on this partition to the\n\ +slackware/ directory where the directories containing\n\ +installation files and packages to be installed are kept.\n\ +For example, if you downloaded Slackware into the /stuff\n\ +directory on your hard drive (so that you have the\n\ +directories /stuff/slackware/a, /stuff/slackware/ap, and so on\n\ +each containing the files that would be in that directory on\n\ +the FTP site), then the full path to enter here would be:\n\ +\n\ + /stuff/slackware\n\ +\n\ +What directory are the Slackware sources in?" \ +19 65 2> $TMP/source.dir +if [ ! $? = 0 ]; then + rm -f $TMP/source.dir + exit +fi +SLACK_SOURCE_LOCATION="`cat $TMP/source.dir`" +rm -f $TMP/source.dir +if mount | grep $SLACK_DEVICE 1> /dev/null 2> /dev/null ; then + # This partition is already mounted, so we will have to + # tweak things funny. + rm -f /var/log/mount 2> /dev/null + rmdir /var/log/mount 2> /dev/null + PREFIX="`mount | grep $SLACK_DEVICE | cut -f 3 -d ' '`" + ln -sf $PREFIX /var/log/mount +else + SUCCESS=false + for type in ext4 ext3 ext2 vfat reiserfs hpfs msdos ; do + mount -r -t $type $SLACK_DEVICE /var/log/mount 1> /dev/null 2> /dev/null + if [ $? = 0 ]; then # mounted successfully + SUCCESS=true + break; + fi + done + if [ ! $SUCCESS = true ]; then # there was a mount error + cat << EOF > $TMP/tempmsg +There was a problem mounting your partition. Would you like to: + +EOF + dialog --title "MOUNT ERROR" --menu "`cat $TMP/tempmsg`" 10 68 2 \ +"Restart" "Start over" \ +"Ignore " "Ignore the error and continue" 2> $TMP/dowhat + if [ ! $? = 0 ]; then + rm -f $TMP/dowhat + exit + fi + DOWHAT="`cat $TMP/dowhat`" + rm -f $TMP/dowhat + if [ "$DOWHAT" = "Restart" ]; then + umount /var/log/mount 2> /dev/null + continue; + fi + echo + fi # mount error +fi + +# First, check if a Slackware ISO image is present in $SLACK_SOURCE_LOCATION +if check_iso_image /var/log/mount/$SLACK_SOURCE_LOCATION /var/log/mntiso ; then + echo "/var/log/mntiso/slackware" > $TMP/SeTDS + echo "-source_mounted" > $TMP/SeTmount + echo "/dev/null" > $TMP/SeTsource + exit +elif [ -f /var/log/mount/$SLACK_SOURCE_LOCATION/slackware/PACKAGES.TXT ]; then + echo "/var/log/mount/$SLACK_SOURCE_LOCATION/slackware" > $TMP/SeTDS + echo "-source_mounted" > $TMP/SeTmount + echo "/dev/null" > $TMP/SeTsource + exit +elif [ -d /var/log/mount/$SLACK_SOURCE_LOCATION ]; then + echo "/var/log/mount/$SLACK_SOURCE_LOCATION" > $TMP/SeTDS + echo "-source_mounted" > $TMP/SeTmount + echo "/dev/null" > $TMP/SeTsource + exit +else + cat << EOF > $TMP/tempmsg + +Sorry, but the directory $SLACK_SOURCE_LOCATION does not exist +on partition $SLACK_DEVICE. + +Would you like to try again? +EOF + dialog --title "SOURCE DIRECTORY NOT FOUND" --yesno "`cat $TMP/tempmsg`" 10 70 + if [ ! $? = 0 ]; then + rm -f $TMP/tempmsg + exit + fi + rm -r $TMP/tempmsg +fi + +done diff --git a/source/installer/sources/initrd/usr/lib/setup/PROMPThelp b/source/installer/sources/initrd/usr/lib/setup/PROMPThelp new file mode 100644 index 000000000..1bc7b15fe --- /dev/null +++ b/source/installer/sources/initrd/usr/lib/setup/PROMPThelp @@ -0,0 +1,83 @@ +PROMPT MODE HELP + +Software packages are about to be transfered onto your +hard drive. Several options exist for selecting which +packages you wish to install. + +If you select "full", the install program will just go +ahead and install everything from the disk sets +you have selected. If you've got enough disk space, this +should work fine. You'll have some packages you don't +need on your hard drive, though, like fairly large X +servers for display hardware you don't own. Not a problem, +if you run short of space, go into /var/log/packages and +read any or all of the files with 'less' to see what +packages you have installed, and remove any unnecessary +ones using 'removepkg'. + +For people who know what they want to install and would +like to select the packages from menus instead of +individually, there are two menu installation modes: +"menu" and "expert". + +"menu" mode puts up a menu at the start of each series of +packages, from which you can install systems such as +the GNU C/C++ compiler, or the Linux source code. It's +easy to use, and makes installation go much faster than +"newbie" mode. + +"expert" mode is similar, but allows the toggling of every +individual package. This offers the greatest control over +what gets installed on the machine, but can be tricky for +beginners. + +The so-called "newbie" mode will follow a defaults file in +the first directory of each series you install that will +install some required package automatically, while prompting +you about the rest of them, one by one. This mode of +installation _really_ is no longer recommended. There are +so many packages now that the time added to the installation +is quite significant, and the chance of accidentally leaving +out an important package is high. If you haven't installed +Slackware before, the best thing to do is make sure you have +plenty of space and go for a "full" installation. + +About the "tagfile" files: + +The package installation defaults are user definable - you +may set any package to be added or skipped automatically by +editing your choices into a file called TAGFILE that will be +found on the first disk of each series. The tagfile contains +all the instructions needed to completely automate your +installation. + +NOTE: Software may be added to your system after the +initial installation. Just type 'setup' to add software +to your system. Another script, 'pkgtool', may be used to +add software packages from the current directory, or to +cleanly remove packages that you want uninstalled. Also, +command line utilities (installpkg, removepkg, makepkg, +etc) are available, and (once learned) more efficient to +use. These are what I use for package management. + +If you use tagfiles, you might want to use a custom +tagfile that you have created yourself instead of the +default ones that come with Slackware (the ones named +'tagfile'). For instance, I use custom tagfiles called +'tagfile.pat' that you might see on your disks. :^) You +make a custom tagfile by copying the 'tagfile' on the +first disk of a series to a file named 'tagfile.???' +where .??? is a custom extension of your choosing. (I use +'.pat') Once you've done this, you can edit the defaults +any way you like. (but be careful about changing stuff +that was installed by default) + +To use a custom tagfile, just choose "custom" on the +prompt mode menu, and enter your custom extension. Any +tagfiles with this extension will then be used for the +duration of the installation. If at any point a tagfile +with that extension cannot be found, the default tagfile +will be used instead. + +-- End of prompt mode help text + diff --git a/source/installer/sources/initrd/usr/lib/setup/PXEhelp b/source/installer/sources/initrd/usr/lib/setup/PXEhelp new file mode 100644 index 000000000..99c2ad938 --- /dev/null +++ b/source/installer/sources/initrd/usr/lib/setup/PXEhelp @@ -0,0 +1,108 @@ + +Slackware PXE Server Help +_________________________ + +First, a little help on help. Whenever you encounter a text +viewer like this during the installation, you can move around +with these commands: + +PGDN/SPACE - Move down one page +PGUP/'b' - Move up one page +ENTER/DOWN/'j' - Move down one line +UP/'k' - Move up one line +LEFT/'h' - Scroll left +RIGHT/'l' - Scroll right +'0' - Move to beginning of line +HOME/'g' - Move to beginning of file +END/'G' - Move to end of file +'/' - Forward search +'?' - Backward search +'n' - Repeat last search (forward) + +Also, you're running a real multitasking operating system now, so +you're not confined to the installation program. You can log into +other consoles and look around at any time without disturbing the +installation process. To do this, you need to learn the commands +that control the Linux console. You'll use these commands all the +time when you're logged into Linux. + +"Virtual" consoles and scrollback: + +Right now, the screen you're looking at is probably VIRTUAL CONSOLE +NUMBER ONE, (or /dev/tty1 in Linux-speak). There are usually +several virtual consoles available. When you log into the install +disk, there are four consoles. To switch among them, use Alt-F1, +Alt-F2, Alt-F3, or Alt-F4 to select which of the four consoles you +wish to use. While you're using a console, you get a small amount +of text scrollback buffer. To scroll the console back, hold down +the right shift key and hit PageUp. To scroll the console forward, +hit PageDown while holding the right shift key down. This can be +especially useful for reading the boot messages, which can go by +too fast to read otherwise. + + +RUNNING THE PXESETUP PROGRAM + + +The pxesetup main menu is kept as easy as possible, because only a +limited configuration is needed. + + +NETWORK (configure the network device and optional DHCP server) +SOURCE (select the source location for the Slackware Linux + packages) +ACTIVATE (start the PXE server) + + +In the NETWORK configuration stage, you configure an IP address for +your network card. If you have already a DHCP server in your local +network, the pxesetup program will offer you the choice of using the +DHCP server to configure your network device fully automatic, but +there is always the option to enter an IP address manually. If no +DHCP server has been detected running inside your local network, +then pxesetup will start its own DHCP server (we need one). You will +get the chance to define the IP address range which that internal +DHCP server uses. You should check the lower and upper IP addresses +carefully and verify that none of your local network's computers, +including your local gateway, use an IP address in that DHCP range. +If you spot a conflict, you can adjust these lower and upper bounds. +Press 'Accept' once you are satisfied. + +In the SOURCE configuration stage, you determine where you have +your local Slackware copy. This should be a complete directory +tree including the packages, the kernels and the isolinux directory. +The package sources are not needed and can be omitted from the medium +if you are using a bootable USB stick for instance. The choices +for SOURCE location are: a DVD medium, a local disk partition or +a pre-mounted directory. These are the standard setup dialogs you +will certainly know from installing Slackware. Be sure to enter the +full directory path to (and including) the directory which contains +the 'a', 'ap', 'd', ..., 'y' subdirectiries. You know the drill. + + +When you are done configuring NETWORK and SOURCE, it is time to +ACTIVATE your PXE server. The screen will show a live view of the +server's connection log for client boot requests. This goes on +until you press 'Exit' which will drop you back into the main menu +after killing the PXE service. Selecting ACTIVATE will restart the +PXE service. Computers who boot from your PXE server will see the +usual Slackware installation routine. When it comes to selecting the +SOURCE, these computers have one choice, and is the entry "Install +from FTP/HTTP server". The PXE server offers Slackware packages to +willing computers using its own internal HTTP server. The default +values that you will see for the URL and the PATH input fields are +being supplied by the PXE server and should not be changed. + + +...WHEN YOU'RE DONE: + + +EXIT: This leaves Slackware PXE Server setup. + + +Have fun running this PXE server! + +--- +Eric Hameleers +alien@slackware.com + diff --git a/source/installer/sources/initrd/usr/lib/setup/SeTDOS b/source/installer/sources/initrd/usr/lib/setup/SeTDOS new file mode 100755 index 000000000..4f9d10577 --- /dev/null +++ b/source/installer/sources/initrd/usr/lib/setup/SeTDOS @@ -0,0 +1,214 @@ +#!/bin/sh +# SeTpartition user-friendly rewrite Fri Dec 15 13:17:40 CST 1995 pjv +# More updates for Slackware 3.5: Wed Apr 29 22:43:28 CDT 1998 +# Updated for Slackware 7.x (new fdisk tags) Fri Sep 10 13:17:18 CDT 1999 +TMP=/var/log/setup/tmp +T_PX="`cat $TMP/SeTT_PX`" +if [ ! -d $TMP ]; then + mkdir -p $TMP +fi +REDIR=/dev/tty4 +NDIR=/dev/null +rm -f $TMP/SeTDOS +touch $TMP/SeTDOS + +crunch () { # remove extra whitespace + read STRING; + echo $STRING +} + +# get_part_size( dev ) - Return the size in K, M, G, T, or P of the named partition. +get_part_size() { + numfmt --to=iec $(blockdev --getsize64 $1) +} + +ntfs_security() { + rm -f $TMP/ntfs_security + dialog --backtitle "Setting permissions on NTFS partition $DOS_PART" \ + --title "SET SECURITY FOR NTFS PARTITION $DOS_PART" \ + --default-item "fmask=177,dmask=077" \ + --menu "Because users could go snooping through (or destroy, depending on \ +the settings) your Windows partition, you should choose how much access would you \ +like your non-root users to have to partition $DOS_PART. The access level can \ +range from no access at all, to read-only for everyone, to read-write access \ +for every user on the machine. A reasonable default (read-write for root only) \ +is chosen, but you may set this any way that you like." \ +16 77 4 \ +"fmask=177,dmask=077" "Root has read/write access, users have no access (ntfs-3g)" \ +"fmask=333,dmask=222" "Everyone has read only access (built-in kernel ntfs driver)" \ +"fmask=133,dmask=022" "Everyone has read access, but only root can write (ntfs-3g)" \ +"fmask=111,dmask=000" "All users can read/write to any file (ntfs-3g)" \ +2> $TMP/ntfs_security + if [ ! $? = 0 ]; then + rm -f $TMP/ntfs_security $TMP/mount-point $TMP/SeTDOS + echo 1 + fi +} + +fat_security() { + rm -f $TMP/fat_security + dialog --backtitle "Setting permissions on FAT partition $DOS_PART" \ + --title "SET SECURITY FOR FAT PARTITION $DOS_PART" \ + --default-item "fmask=177,dmask=077" \ + --menu "Because users could go snooping through (or destroy, depending on \ +the settings) your Windows partition, you should choose how much access would you \ +like your non-root users to have to partition $DOS_PART. The access level can \ +range from no access at all, to read-only for everyone, to read-write access \ +for every user on the machine. A reasonable default (read-write for root only) \ +is chosen, but you may set this any way that you like." \ +18 77 4 \ +"fmask=177,dmask=077" "Root has read/write access, users have no access" \ +"fmask=333,dmask=222" "Everyone has read only access" \ +"fmask=133,dmask=022" "Everyone has read access, but only root can write" \ +"fmask=111,dmask=000" "All users can read/write to any file" \ +2> $TMP/fat_security + if [ ! $? = 0 ]; then + rm -f $TMP/fat_security $TMP/mount-point $TMP/SeTDOS + echo 1 + fi +} + +# Since the USB installers (both usbboot.img and the ones created using +# usbimg2disk.sh) present bogus FAT/NTFS partitions, we need a way to +# filter these from the partition scan. To do this, we'll set a variable +# $BANHAMMER that contains the name of the device the stick was found on. +# First, we'll set that to contain some random nonsense that will never +# be an actual device since reverse grepping for "" won't work. +BANHAMMER="0xFE11C1A" +# Look for the usbboot.img stick: +if [ -L /dev/disk/by-label/USBSLACK ]; then + BANHAMMER="$(readlink -f /dev/disk/by-label/USBSLACK)" +fi +# Look for the usbimg2disk.sh stick: +if [ -L /dev/disk/by-label/USBSLACKINS ]; then + BANHAMMER="$(readlink -f /dev/disk/by-label/USBSLACKINS | cut -b 1-8)" +fi +# Suggested new GPT partition type: Microsoft basic data +# More research needed... could be FAT32, NTFS, or EXFAT +DOSLIST="$(probe -l 2> /dev/null | grep -E "DOS|Win(95 F|98 F)|HPFS|W95 F|FAT(12|16)" | grep -Ev "Ext('d|end)" | grep -v "$BANHAMMER" | sort)" +if [ "$DOSLIST" = "" ]; then # no FAT or NTFS partitions + exit +fi +dialog --backtitle "Setting up non-Linux partitions." \ +--title "FAT or NTFS PARTITIONS DETECTED" \ +--yesno "Partitions of type FAT or NTFS (commonly used by DOS and \ +Windows) have been found on your \ +system. Would you like to add these partitions to your /etc/fstab \ +so that these partitions are visible from Linux?" \ +8 70 +if [ ! $? = 0 ]; then + exit +fi +while [ 0 ]; do # main partition selection loop + rm -f $TMP/SeTSKIP + echo "true" > $TMP/SeTSKIP + cat << EOF > $TMP/tempscript +dialog --backtitle "Selecting non-Linux partitions." \\ +--title "SELECT PARTITION TO ADD TO /etc/fstab" \\ +--ok-label Select --cancel-label Continue \\ +--menu "In order to make these partitions visible from Linux, we \\ +need to add them to your /etc/fstab. Please pick a partition to \\ +add to /etc/fstab, or select '---' to continue with the installation \\ +process." \\ +15 70 5 \\ +EOF + echo "$DOSLIST" | while read PARTITION ; do + NAME=`echo $PARTITION | crunch | cut -f 1 -d ' '` + SIZE=`get_part_size $NAME` + if echo $PARTITION | grep Win9 1> $NDIR 2> $NDIR ; then + TYPE="FAT32" + elif echo $PARTITION | grep "W95 F" 1> $NDIR 2> $NDIR ; then + TYPE="FAT32" + elif echo $PARTITION | grep NTFS 1> $NDIR 2> $NDIR ; then + TYPE="NTFS" + elif echo $PARTITION | grep FAT 1> $NDIR 2> $NDIR ; then + TYPE="FAT16" + fi + if cat $TMP/SeTDOS | grep $NAME 1> $NDIR 2> $NDIR ; then + ON=`cat $TMP/SeTDOS | grep $NAME | crunch | cut -f 2 -d ' '` + echo "\"(IN USE)\" \"$NAME on $ON $TYPE ${SIZE}\" \\" >> $TMP/tempscript + else + echo "\"$NAME\" \"$TYPE ${SIZE}\" \\" >> $TMP/tempscript + echo "false" > $TMP/SeTSKIP + fi + done + echo "\"---\" \"(done, continue with setup)\" \\" >> $TMP/tempscript + echo "\"---\" \"(done, continue with setup)\" \\" >> $TMP/tempscript + echo "\"---\" \"(done, continue with setup)\" \\" >> $TMP/tempscript + echo "\"---\" \"(done, continue with setup)\" \\" >> $TMP/tempscript + echo "\"---\" \"(done, continue with setup)\" \\" >> $TMP/tempscript + echo "2> $TMP/return" >> $TMP/tempscript + if [ "`cat $TMP/SeTSKIP`" = "true" ]; then + break + fi + . $TMP/tempscript + if [ ! $? = 0 ]; then + rm $TMP/tempscript + exit 255 # user abort + fi + DOS_PART="`cat $TMP/return`" + rm -f $TMP/tempscript + if [ "$DOS_PART" = "---" ]; then + break + elif [ "$DOS_PART" = "(IN USE)" ]; then + continue + fi + if echo "$DOSLIST" | grep -w $DOS_PART | grep NTFS 1> $NDIR 2> $NDIR ; then + ntfs_security + FS_UMASK="$(cat $TMP/ntfs_security)" + if [ "$FS_UMASK" = "1" ]; then + exit 1 + else + if [ "$FS_UMASK" = "fmask=333,dmask=222" ]; then + FS_TYPE=ntfs + else + FS_TYPE=ntfs-3g + fi + fi + else + FS_TYPE=vfat + fat_security + FS_UMASK="$(cat $TMP/fat_security)" + fi + dialog --backtitle "Selecting a location to mount $DOS_PART." \ + --title "PICK MOUNT POINT FOR $DOS_PART" \ + --inputbox "Now this partition must be mounted somewhere in your \ + directory tree. Please enter the directory under which \ + you would like to put it. For instance, you might want to \ + enter /fat-c or /fat-d or something similar. \ + NOTE: This \ + partition won't actually be mounted until you reboot. \ + Where would you like to mount $DOS_PART?" \ + 13 65 2> $TMP/mount-point + if [ ! $? = 0 ]; then + rm -f $TMP/tempmsg $TMP/mount-point $TMP/SeTDOS + exit + fi + NEW_DIR="`cat $TMP/mount-point`" + rm -f $TMP/mount-point + # If this was left blank or is '/', drop back to the first menu and start over. + if [ "$NEW_DIR" = "" -o "$NEW_DIR" = "/" ]; then + continue + fi + if [ ! "`echo $NEW_DIR | cut -b1`" = "/" ]; then + NEW_DIR="/$NEW_DIR" + fi + mkdir -p ${T_PX}$NEW_DIR + chmod 755 ${T_PX}$NEW_DIR + if echo "$DOSLIST" | grep $DOS_PART | grep NTFS 1> $NDIR 2> $NDIR ; then + printf "%-16s %-16s %-11s %-16s %-3s %s\n" "$DOS_PART" "$NEW_DIR" "$FS_TYPE" "$FS_UMASK" "1" "0" >> $TMP/SeTDOS + else + printf "%-16s %-16s %-11s %-16s %-3s %s\n" "$DOS_PART" "$NEW_DIR" "$FS_TYPE" "$FS_UMASK" "1" "0" >> $TMP/SeTDOS + fi +done # partition adding loop +rm -f $TMP/SeTSKIP +cat << EOF > $TMP/tempmsg + +Adding this information to your /etc/fstab: + +EOF +cat $TMP/SeTDOS >> $TMP/tempmsg +dialog --backtitle "Finished setting up non-Linux partitions." \ +--title "DONE ADDING FAT or NTFS PARTITIONS" \ +--exit-label OK \ +--textbox $TMP/tempmsg 15 72 diff --git a/source/installer/sources/initrd/usr/lib/setup/SeTEFI b/source/installer/sources/initrd/usr/lib/setup/SeTEFI new file mode 100755 index 000000000..35ac5f9fa --- /dev/null +++ b/source/installer/sources/initrd/usr/lib/setup/SeTEFI @@ -0,0 +1,94 @@ +#!/bin/sh +TMP=/var/log/setup/tmp +T_PX="`cat $TMP/SeTT_PX`" +if [ ! -d $TMP ]; then + mkdir -p $TMP +fi +rm -f $TMP/SeTefipartitions +touch $TMP/SeTefipartitions + +# Scan for EFI partitions: +# We accept at most 10 NVMe controllers, each controlling at most 4 SSDs +for drive in sda sdb sdc sdd sde sdf sdg sdh sdi sdj sdk sdl sdm sdn sdo sdp \ + mmcblk0 mmcblk1 mmcblk2 mmcblk3 mmcblk4 mmcblk5 mmcblk6 mmcblk7 mmcblk8 mmcblk9 \ + nvme0n1 nvme1n1 nvme2n1 nvme3n1 nvme4n1 nvme5n1 nvme6n1 nvme7n1 nvme8n1 nvme9n1 \ + nvme0n2 nvme1n2 nvme2n2 nvme3n2 nvme4n2 nvme5n2 nvme6n2 nvme7n2 nvme8n2 nvme9n2 \ + nvme0n3 nvme1n3 nvme2n3 nvme3n3 nvme4n3 nvme5n3 nvme6n3 nvme7n3 nvme8n3 nvme9n3 \ + nvme0n4 nvme1n4 nvme2n4 nvme3n4 nvme4n4 nvme5n4 nvme6n4 nvme7n4 nvme8n4 nvme9n4 ; do + gdisk -l /dev/$drive 2> /dev/null | grep -w EF00 | while read efisp ; do + p="" + echo $drive| grep -q nvme && p="p" + echo /dev/$drive$p$(expr $(echo "$efisp" | cut -b 1-4)) >> $TMP/SeTefipartitions + done +done + +if [ "$(cat $TMP/SeTefipartitions)" = "" ]; then # No EFI partitions + rm -f $TMP/SeTefipartitions + exit +fi + +# Initially, we will just take the first EFI partition found, which +# will probably be on /dev/sda: +PREFERRED_EFI_PARTITION="$(cat $TMP/SeTefipartitions | head -n 1)" + +# But we will also test to see if there is an EFI partition on the same +# device as the root partition, and if so, prefer that: +if [ -r $TMP/SeTrootdev ]; then + if grep -q "$(cat $TMP/SeTrootdev | cut -b 1-8)" $TMP/SeTefipartitions ; then + PREFERRED_EFI_PARTITION="$(grep "$(cat $TMP/SeTrootdev | cut -b 1-8)" $TMP/SeTefipartitions | head -n 1)" + fi +fi + +# This file is no longer needed: +rm -f $TMP/SeTefipartitions + +# See if EFI partition is formatted. If not, offer to format it: +EFITMPMOUNT=$(mktemp -d) +if ! mount $PREFERRED_EFI_PARTITION $EFITMPMOUNT 1> /dev/null 2> /dev/null ; then + # It didn't mount, so it must not be formatted: + dialog --title "FORMAT EFI PARTITION ${PREFERRED_EFI_PARTITION}?" \ + --yesno "An EFI System Partition was found on ${PREFERRED_EFI_PARTITION}, \ +but it has not yet been formatted. Would you like to format this partition?" \ +7 56 + if [ ! $? = 0 ]; then + exit + fi + # Format the partition with FAT32, 2 sectors per cluster (needed for the + # minimum supported EFI partition size of 100MB): + dialog --title "FORMATTING EFI PARTITION ${PREFERRED_EFI_PARTITION}" --infobox \ + "Formatting EFI System Partition ${PREFERRED_EFI_PARTITION} as FAT32." 3 60 + mkfs.vfat -F 32 -s 2 ${PREFERRED_EFI_PARTITION} 1> /dev/null 2> /dev/null + sleep 1 + mount ${PREFERRED_EFI_PARTITION} $EFITMPMOUNT 1> /dev/null 2> /dev/null +fi +if [ ! -d $EFITMPMOUNT/EFI -a ! -d $EFITMPMOUNT/efi ]; then + mkdir $EFITMPMOUNT/EFI 1> /dev/null 2> /dev/null +fi +umount $PREFERRED_EFI_PARTITION 1> /dev/null 2> /dev/null +rmdir $EFITMPMOUNT + +# Mount the partition on ${T_PX}/boot/efi: +if [ ! -d ${T_PX}/boot/efi ]; then + mkdir -p ${T_PX}/boot/efi +fi +mount ${PREFERRED_EFI_PARTITION} ${T_PX}/boot/efi 1> /dev/null 2> /dev/null + +# Add the EFI System Partition to /etc/fstab: +printf "%-16s %-16s %-11s %-16s %-3s %s\n" "$PREFERRED_EFI_PARTITION" "/boot/efi" "vfat" "defaults" "1" "0" > $TMP/SeTEFI +cat << EOF > $TMP/tempmsg + +Adding this information to your /etc/fstab: + +EOF +cat $TMP/SeTEFI >> $TMP/tempmsg +dialog --backtitle "Finished setting up EFI System Partition." \ +--title "EFI SYSTEM PARTITION RECOGNIZED" \ +--exit-label OK \ +--textbox $TMP/tempmsg 10 72 + +# Piggyback this fstab addition on the other native partitions in SeTnative: +cat $TMP/SeTEFI >> $TMP/SeTnative +rm -f $TMP/SeTEFI $TMP/tempmsg + +# Done. + diff --git a/source/installer/sources/initrd/usr/lib/setup/SeTPKG b/source/installer/sources/initrd/usr/lib/setup/SeTPKG new file mode 100755 index 000000000..22ad2d9d3 --- /dev/null +++ b/source/installer/sources/initrd/usr/lib/setup/SeTPKG @@ -0,0 +1,148 @@ +#!/bin/sh +TMP=/var/log/setup/tmp +T_PX="`cat $TMP/SeTT_PX`" +if [ ! -d $TMP ]; then + mkdir -p $TMP +fi +# If the distribution source is already known, we can avoid listing +# stuff that isn't there. +if [ ! -r $TMP/SeTT_PX -o ! -r $TMP/SeTDS ]; then + unset T_PX + unset DS +else + T_PX="`cat $TMP/SeTT_PX`" + DS="`cat $TMP/SeTDS`" +fi +# In /usr/lib/setup/slackinstall, $TMP/series is a directory. +# Depending on how you use the 'setup' script, you can end up going +# round in circles due to this script using 'series' as a text file but +# not being able delete it due to an rm -f. Now we use rm -rf. +# It's a toss up between accidentally wiping the series selection +# (it only takes a few seconds to re-select the stuff) and getting +# confused. +rm -rf $TMP/SeTSERIES $TMP/tmpscript $TMP/series + +cat << EOF > $TMP/tmpscript +dialog --backtitle "Selecting software to install." \\ +--title "PACKAGE SERIES SELECTION" --item-help --output-separator "#" --checklist \\ +"Now it's time to select which general categories of software \\ +to install on your system. \\ +Use the spacebar to select or unselect the software you wish to \\ +install. \\ +You can use the up and down arrows to see all the possible choices. \\ +Recommended choices have been preselected. \\ +Press the ENTER key when you are finished." \\ +20 75 9 \\ +"A" "Base Linux system" on "The A (base) series contains the kernel and main system utilities." \\ +EOF + +if [ -d $DS/ap -o "$DS" = "" ]; then +cat << EOF >> $TMP/tmpscript +"AP" "Various Applications that do not need X" on "The AP series is a collection of useful applications." \\ +EOF +fi + +if [ -d $DS/d -o "$DS" = "" ]; then +cat << EOF >> $TMP/tmpscript +"D" "Program Development (C, C++, Lisp, Perl, etc.)" on "The D series contains compilers, debuggers, and other programming tools." \\ +EOF +fi + +if [ -d $DS/e -o "$DS" = "" ]; then +cat << EOF >> $TMP/tmpscript +"E" "GNU Emacs" on "The E series contains the GNU Emacs advanced real-time display editor." \\ +EOF +fi + +if [ -d $DS/f -o "$DS" = "" ]; then +cat << EOF >> $TMP/tmpscript +"F" "FAQ lists, HOWTO documentation" on "The F series contains essential documentation for Linux system administrators." \\ +EOF +fi + +if [ -d $DS/gnome -o "$DS" = "" ]; then +cat << EOF >> $TMP/tmpscript +"GNOME" "The GNOME desktop for X" on "The GNOME series contains the GNOME desktop environment and related libraries." \\ +EOF +fi + +if [ -d $DS/k -o "$DS" = "" ]; then +cat << EOF >> $TMP/tmpscript +"K" "Linux kernel source" on "The K series contains the source code for the Linux kernel." \\ +EOF +fi + +if [ -d $DS/kde -o "$DS" = "" ]; then +cat << EOF >> $TMP/tmpscript +"KDE" "Qt and the K Desktop Environment for X" on "The KDE series contains the K Desktop Environment and related libraries." \\ +EOF +fi + +if [ -d $DS/kdei -o "$DS" = "" ]; then +cat << EOF >> $TMP/tmpscript +"KDEI" "International language support for KDE" off "The KDEI series provides support for languages other than US English in KDE." \\ +EOF +fi + +if [ -d $DS/l -o "$DS" = "" ]; then +cat << EOF >> $TMP/tmpscript +"L" "System Libraries (some needed by both KDE and GNOME)" "on" "The L series contains libraries needed by GNOME, KDE, and other programs." \\ +EOF +fi + +if [ -d $DS/n -o "$DS" = "" ]; then +cat << EOF >> $TMP/tmpscript +"N" "Networking (TCP/IP, UUCP, Mail, News)" on "The N series contains network related clients and servers." \\ +EOF +fi + +if [ -d $DS/t -o "$DS" = "" ]; then +cat << EOF >> $TMP/tmpscript +"T" "TeX typesetting software" on "TeX is a typesetting system often used for mathematics and technical papers." \\ +EOF +fi + +if [ -d $DS/tcl -o "$DS" = "" ]; then +cat << EOF >> $TMP/tmpscript +"TCL" "Tcl/Tk script languages" on "The TCL series contains the Tcl/Tk/TclX languages and programs that use them." \\ +EOF +fi + +if [ -d $DS/x -o "$DS" = "" ]; then +cat << EOF >> $TMP/tmpscript +"X" "X Window System" on "This series contains X, the windowing system used by Linux." \\ +EOF +fi + +if [ -d $DS/xap -o "$DS" = "" ]; then +cat << EOF >> $TMP/tmpscript +"XAP" "X Applications" on "The XAP series is a collection of applications for X." \\ +EOF +fi + +if [ -d $DS/xfce -o "$DS" = "" ]; then +cat << EOF >> $TMP/tmpscript +"XFCE" "The Xfce Desktop Environment for X" on "Xfce is a fast and lightweight GTK+ based desktop environment for X." \\ +EOF +fi + +if [ -d $DS/y -o "$DS" = "" ]; then +cat << EOF >> $TMP/tmpscript +"Y" "Games" on "The Y series is a collection of classic BSD text-based games." \\ +EOF +fi + +cat << EOF >> $TMP/tmpscript + 2> $TMP/series +EOF +. $TMP/tmpscript +if [ ! $? = 0 ]; then + rm -rf $TMP/series $TMP/tmpscript + exit +fi +INSTSETS="`cat $TMP/series | tr -d " "`" +INSTSETS="`echo $INSTSETS | tr "\042" "#" `" +INSTSETS="`echo $INSTSETS | tr "," "#" `" +INSTSETS="`echo $INSTSETS | tr -s "#" `" +rm -rf $TMP/series $TMP/tmpscript +echo "$INSTSETS" > $TMP/SeTSERIES diff --git a/source/installer/sources/initrd/usr/lib/setup/SeTPXEHELP b/source/installer/sources/initrd/usr/lib/setup/SeTPXEHELP new file mode 100755 index 000000000..a8f25c475 --- /dev/null +++ b/source/installer/sources/initrd/usr/lib/setup/SeTPXEHELP @@ -0,0 +1,2 @@ +#!/bin/sh +dialog --title "Slackware PXE Server Help" --exit-label OK --textbox "/usr/lib/setup/PXEhelp" 22 77 diff --git a/source/installer/sources/initrd/usr/lib/setup/SeTconfig b/source/installer/sources/initrd/usr/lib/setup/SeTconfig new file mode 100755 index 000000000..6731019bb --- /dev/null +++ b/source/installer/sources/initrd/usr/lib/setup/SeTconfig @@ -0,0 +1,138 @@ +#!/bin/sh +TMP=/var/log/setup/tmp +if [ ! -d $TMP ]; then + mkdir -p $TMP +fi +T_PX="`cat $TMP/SeTT_PX`" +ROOT_DEVICE="`cat $TMP/SeTrootdev`" +if [ ! -d $T_PX/bin -a ! -d $T_PX/etc ]; then # if there no Linux here, exit + exit +fi + +# Check for disk full error: +. /usr/lib/setup/SeTfull + +# These next lines are intended to clean up any permissions +# problems that could be caused by a bad package. We don't +# intend to make any bad packages here, but it never hurts +# to be safe. :^) +( cd $T_PX ; chmod 755 ./ ) +( cd $T_PX ; chmod 755 ./var ) +if [ -d $T_PX/usr/src/linux ]; then + chmod 755 $T_PX/usr/src/linux +fi +if [ ! -d $T_PX/proc ]; then + mkdir $T_PX/proc + chown root.root $T_PX/proc +fi +if [ ! -d $T_PX/sys ]; then + mkdir $T_PX/sys + chown root.root $T_PX/sys +fi +chmod 1777 $T_PX/tmp +if [ ! -d $T_PX/var/spool/mail ]; then + mkdir -p $T_PX/var/spool/mail + chmod 755 $T_PX/var/spool + chown root.mail $T_PX/var/spool/mail + chmod 1777 $T_PX/var/spool/mail +fi + +# Some of the install scripts need /proc and /sys. +# Some disks will need /dev with module loaded devices. +if [ ! "$T_PX" = "/" ]; then + mount --bind /proc $T_PX/proc 1> /dev/null 2> /dev/null + mount --bind /sys $T_PX/sys 1> /dev/null 2> /dev/null + mount --bind /dev $T_PX/dev 1> /dev/null 2> /dev/null +fi +# These will be left connected rather than unmounting them to +# make it easier to set up LVM/LUKS. + +# Load keyboard map (if any) when booting +if [ -r $TMP/SeTkeymap ]; then + MAPNAME="`cat $TMP/SeTkeymap`" + echo "#!/bin/sh" > $T_PX/etc/rc.d/rc.keymap + echo "# Load the keyboard map. More maps are in /usr/share/kbd/keymaps." \ + >> $T_PX/etc/rc.d/rc.keymap + echo "if [ -x /usr/bin/loadkeys ]; then" >> $T_PX/etc/rc.d/rc.keymap + echo " /usr/bin/loadkeys $MAPNAME" >> $T_PX/etc/rc.d/rc.keymap + echo "fi" >> $T_PX/etc/rc.d/rc.keymap + chmod 755 $T_PX/etc/rc.d/rc.keymap +fi + +# Only ask if we want to skip configuring if we suspect the user should +# skip the step: +if [ -r $T_PX/etc/fstab ]; then + dialog --title "CONFIGURE THE SYSTEM" --yesno "Now we can configure your \ +Linux system. If this is a new installation, you MUST configure it now or it \ +will not boot correctly. However, if you are just adding software to an \ +existing system, you can back out to the main menu and skip this step. \ +However (important exception) if you've installed a new kernel image, it's \ +important to reconfigure your system so that you can install LILO (the Linux \ +loader) or create a bootdisk using the new kernel. You want to CONFIGURE \ +your system, right?" 0 0 + if [ ! $? = 0 ]; then + exit + fi +else + dialog --title "DONE INSTALLING PACKAGES" --infobox \ +"Preparing to configure your new Linux system..." 3 54 + sleep 1 +fi + +# Post installation and setup scripts added by packages. +if [ -d $T_PX/var/log/setup ]; then + # Prepare for LVM in a newly installed system + if [ -r /etc/lvmtab -o -d /etc/lvm/backup ]; then # Available in local root + if [ ! -r $T_PX/etc/lvmtab -a ! -d $T_PX/etc/lvm/backup ]; then + #mount --bind /proc $T_PX/proc + #mount --bind /sys $T_PX/sys + chroot $T_PX /sbin/vgscan --mknodes --ignorelockingfailure 1> /dev/null 2> /dev/null + # First run does not always catch LVM on a LUKS partition: + chroot $T_PX /sbin/vgscan --mknodes --ignorelockingfailure 1> /dev/null 2> /dev/null + fi + fi + for INSTALL_SCRIPTS in $T_PX/var/log/setup/setup.* ; do + SCRIPT=`basename $INSTALL_SCRIPTS` + # Here, we call each script in /var/log/setup. Two arguments are provided: + # 1 -- the target prefix (normally /, but ${T_PX} from the bootdisk) + # 2 -- the name of the root device. + ( cd $T_PX + if [ -x var/log/setup/$SCRIPT ]; then + ./var/log/setup/$SCRIPT $T_PX $ROOT_DEVICE + fi + ) + if echo $SCRIPT | grep onlyonce 1> /dev/null 2> /dev/null; then # only run after first install + if [ ! -d $T_PX/var/log/setup/install ]; then + mkdir $T_PX/var/log/setup/install + fi + mv $INSTALL_SCRIPTS $T_PX/var/log/setup/install + fi + done +fi + +# Figure out how to set the /dev/cdrom and/or /dev/dvd symlinks. Everything seems to +# report itself as a DVD-ROM, so don't blame me. Without asking what's what, all we can +# do here is guess. It's a better guess than before, though, as now it takes ide-scsi +# into account. This won't really matter these days (2018), as everything uses udev to +# create /dev, and it makes links like this... +if dmesg | grep "ATAPI CD" 1> /dev/null 2> /dev/null ; then + dmesg | grep "ATAPI CD" | while read device ; do + shortdev=`echo $device | cut -f 1 -d :` + if grep -w "$shortdev=ide-scsi" $T_PX/etc/lilo.conf 1> /dev/null 2> /dev/null ; then + shortdev=sr0 + fi + ( cd $T_PX/dev + rm -f cdrom dvd + ln -sf /dev/$shortdev cdrom + ln -sf /dev/$shortdev dvd + ) + # Rather than keep overwriting the devices, quit keeping only links to the first + # device found. "Real" users will use the actual devices instead of silly links + # anyway. ;-) + break; + done +fi + +# Set root password: +/usr/lib/setup/SeTpasswd + diff --git a/source/installer/sources/initrd/usr/lib/setup/SeTfdHELP b/source/installer/sources/initrd/usr/lib/setup/SeTfdHELP new file mode 100755 index 000000000..d2e68b305 --- /dev/null +++ b/source/installer/sources/initrd/usr/lib/setup/SeTfdHELP @@ -0,0 +1,2 @@ +#!/bin/sh +dialog --title "Slackware Setup Help" --exit-label OK --textbox "/usr/lib/setup/FDhelp" 22 77 diff --git a/source/installer/sources/initrd/usr/lib/setup/SeTfull b/source/installer/sources/initrd/usr/lib/setup/SeTfull new file mode 100755 index 000000000..bd32f3194 --- /dev/null +++ b/source/installer/sources/initrd/usr/lib/setup/SeTfull @@ -0,0 +1,24 @@ +#!/bin/sh +if [ "$TMP" = "" ]; then + TMP=/var/log/setup/tmp +fi +if [ ! -d $TMP ]; then + mkdir -p $TMP +fi +# Test writing a 256K file and assume if it returns an error +# that it means the drive filled up +dd if=/dev/zero of=$TMP/SeTtestfull bs=1024 count=256 1> /dev/null 2> /dev/null +FULLERR=$? +rm -f $TMP/SeTtestfull +if [ ! "$FULLERR" = "0" ]; then + dialog --title "ERROR: TARGET PARTITION FULL" --msgbox "Setup has \ +detected that one or more of your target partitions has become full. \ +I'm sorry, but you will have to try installing again onto a partition \ +or partitions with more free space. You could also try selecting \ +fewer packages to \ +install. Since there is no longer any space for setup to make its \ +temporary files, this is an unrecoverable error. Press control-alt-delete \ +to reboot and try again. Before doing that, you might want to switch to \ +another console (Alt-F2) and use df (disk free utility) to see if you \ +can get an idea of how to avoid this the next time around." 14 65 +fi diff --git a/source/installer/sources/initrd/usr/lib/setup/SeTkernel b/source/installer/sources/initrd/usr/lib/setup/SeTkernel new file mode 100755 index 000000000..6aa3091b1 --- /dev/null +++ b/source/installer/sources/initrd/usr/lib/setup/SeTkernel @@ -0,0 +1,102 @@ +#!/bin/sh +TMP=/var/log/setup/tmp +T_PX="`cat $TMP/SeTT_PX`" + +# First, determine our slackware kernel name: +for ELEMENT in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ; do + if $(cat /proc/cmdline | cut -f $ELEMENT -d ' ' | grep -q SLACK_KERNEL) ; then + SLACK_KERNEL=$(cat /proc/cmdline | cut -f $ELEMENT -d ' ' | cut -f 2 -d =) + fi +done +unset ELEMENT + +# Next, find the kernel's release version: +VERSION=$(uname -r | tr - _) + +# If someone tries to install kernels from a CD that doesn't contain any, +# we'll give them one chance to find a disc that does. +swapdisks() { + if [ -r ${T_PX}/var/log/setup/tmp/SeTCDdev ]; then + CDDEVICE=$(cat ${T_PX}/var/log/setup/tmp/SeTCDdev) + elif [ -r /tmp/SeTCDdev ]; then + CDDEVICE=$(cat /tmp/SeTCDdev) + else + return 1 + fi + umount $CDDEVICE 1> /dev/null 2> /dev/null + eject -s $CDDEVICE + dialog --title "REINSERT KERNEL DISC" --msgbox \ +"Please reinsert the Slackware disc containing the collection \ +of Linux kernels. Usually this is disc number one (the disc \ +that you boot from). Once you've inserted the disc, hit ENTER \ +to continue." \ +8 61 + mount $CDDEVICE /var/log/mount 1> /dev/null 2> /dev/null + if [ ! $? = 0 ]; then + sleep 1 + mount $CDDEVICE /var/log/mount 1> /dev/null 2> /dev/null + if [ ! $? = 0 ]; then + sleep 11 + mount $CDDEVICE /var/log/mount 1> /dev/null 2> /dev/null + fi + fi +} + +( cd boot + if [ "$SLACK_KERNEL" = "generic.s" ]; then + if [ -r vmlinuz-generic-$VERSION ]; then + ln -sf vmlinuz-generic-$VERSION vmlinuz + ln -sf config-generic-$VERSION config + ln -sf System.map-huge-$VERSION System.map + fi + elif [ "$SLACK_KERNEL" = "huge.s" ]; then + if [ -r vmlinuz-huge-$VERSION ]; then + ln -sf vmlinuz-huge-$VERSION vmlinuz + ln -sf config-huge-$VERSION config + ln -sf System.map-huge-$VERSION System.map + fi + elif [ "$SLACK_KERNEL" = "hugesmp.s" ]; then + if [ -r vmlinuz-huge-smp-$VERSION ]; then + ln -sf vmlinuz-huge-smp-$VERSION vmlinuz + ln -sf config-huge-smp-$VERSION config + ln -sf System.map-huge-smp-$VERSION System.map + fi + elif [ "$SLACK_KERNEL" = "gensmp.s" ]; then + if [ -r vmlinuz-generic-smp-$VERSION ]; then + ln -sf vmlinuz-generic-smp-$VERSION vmlinuz + ln -sf config-generic-smp-$VERSION config + ln -sf System.map-generic-smp-$VERSION System.map + fi + elif [ "$SLACK_KERNEL" = "speakup.s" ]; then + # This assumes symlinks /nfs and /cdrom both pointing to /var/log/mount: + if $(mount | grep -q "type nfs") ; then + PLINK=nfs + else + PLINK=cdrom + fi + if [ $PLINK = cdrom -a ! -d /$PLINK/kernels ]; then + swapdisks + fi + if [ ! -d /$PLINK/kernels ]; then + dialog --title "ERROR ATTEMPTING TO INSTALL KERNEL" --msgbox "Sorry, but the directory /$PLINK/kernels \ +was not found. You may need to install the requested kernel $SLACK_KERNEL manually \ +and then install LILO \ +before your system will be able to boot correctly." \ +0 0 + else + rm -f $T_PX/boot/vmlinuz $T_PX/boot/config $T_PX/boot/System.map + cp -a /$PLINK/kernels/$SLACK_KERNEL/bzImage $T_PX/boot/vmlinuz-$SLACK_KERNEL-$VERSION + cp -a /$PLINK/kernels/$SLACK_KERNEL/config $T_PX/boot/config-$SLACK_KERNEL-$VERSION + cp -a /$PLINK/kernels/$SLACK_KERNEL/System.map.gz $T_PX/boot + ( cd $T_PX/boot + gzip -d System.map.gz + mv System.map System.map-$SLACK_KERNEL-$VERSION + ln -sf vmlinuz-$SLACK_KERNEL-$VERSION vmlinuz + ln -sf config-$SLACK_KERNEL-$VERSION config + ln -sf System.map-$SLACK_KERNEL-$VERSION System.map + ) + fi + fi +) + +# and after all that hard work diff --git a/source/installer/sources/initrd/usr/lib/setup/SeTkeymap b/source/installer/sources/initrd/usr/lib/setup/SeTkeymap new file mode 100755 index 000000000..e8ac96396 --- /dev/null +++ b/source/installer/sources/initrd/usr/lib/setup/SeTkeymap @@ -0,0 +1,220 @@ +#!/bin/sh +# Copyright 1993, 1999, 2002 Patrick Volkerding, Moorhead, MN. +# Copyright 2009 Patrick J. Volkerding, Sebeka, MN, USA +# Use and redistribution covered by the same terms as the "setup" script. +TMP=/var/log/setup/tmp +RDIR=/dev/tty4 +if [ ! -d $TMP ]; then + mkdir -p $TMP +fi +while [ 0 ]; do +dialog --title "KEYBOARD MAP SELECTION" --menu "You may select one \ +of the following keyboard maps. If you do not select a keyboard \ +map, 'us.map' (the US keyboard map) is the default. Use the UP/DOWN \ +arrow keys and PageUp/PageDown to scroll \ +through the whole list of choices." \ +22 55 11 \ +"qwerty/us.map" "" \ +"qwerty/uk.map" "" \ +"azerty/azerty.map" "" \ +"azerty/be-latin1.map" "" \ +"azerty/fr-latin0.map" "" \ +"azerty/fr-latin1.map" "" \ +"azerty/fr-latin9.map" "" \ +"azerty/fr-old.map" "" \ +"azerty/fr-pc.map" "" \ +"azerty/fr.map" "" \ +"azerty/wangbe.map" "" \ +"azerty/wangbe2.map" "" \ +"colemak/en-latin9.map" "" \ +"dvorak/ANSI-dvorak.map" "" \ +"dvorak/dvorak-fr.map" "" \ +"dvorak/dvorak-l.map" "" \ +"dvorak/dvorak-r.map" "" \ +"dvorak/dvorak.map" "" \ +"dvorak/no-dvorak.map" "" \ +"fgGIod/tr_f-latin5.map" "" \ +"fgGIod/trf-fgGIod.map" "" \ +"olpc/es-olpc.map" "" \ +"olpc/pt-olpc.map" "" \ +"qwerty/bashkir.map" "" \ +"qwerty/bg-cp1251.map" "" \ +"qwerty/bg-cp855.map" "" \ +"qwerty/bg_bds-cp1251.map" "" \ +"qwerty/bg_bds-utf8.map" "" \ +"qwerty/bg_pho-cp1251.map" "" \ +"qwerty/bg_pho-utf8.map" "" \ +"qwerty/br-abnt.map" "" \ +"qwerty/br-abnt2.map" "" \ +"qwerty/br-latin1-abnt2.map" "" \ +"qwerty/br-latin1-us.map" "" \ +"qwerty/by-cp1251.map" "" \ +"qwerty/by.map" "" \ +"qwerty/bywin-cp1251.map" "" \ +"qwerty/cf.map" "" \ +"qwerty/cz-cp1250.map" "" \ +"qwerty/cz-lat2-prog.map" "" \ +"qwerty/cz-lat2.map" "" \ +"qwerty/cz-qwerty.map" "" \ +"qwerty/defkeymap.map" "" \ +"qwerty/defkeymap_V1.0.map" "" \ +"qwerty/dk-latin1.map" "" \ +"qwerty/dk.map" "" \ +"qwerty/emacs.map" "" \ +"qwerty/emacs2.map" "" \ +"qwerty/es-cp850.map" "" \ +"qwerty/es.map" "" \ +"qwerty/et-nodeadkeys.map" "" \ +"qwerty/et.map" "" \ +"qwerty/fi-latin1.map" "" \ +"qwerty/fi-latin9.map" "" \ +"qwerty/fi-old.map" "" \ +"qwerty/fi.map" "" \ +"qwerty/gr-pc.map" "" \ +"qwerty/gr.map" "" \ +"qwerty/hu101.map" "" \ +"qwerty/il-heb.map" "" \ +"qwerty/il-phonetic.map" "" \ +"qwerty/il.map" "" \ +"qwerty/is-latin1-us.map" "" \ +"qwerty/is-latin1.map" "" \ +"qwerty/it-ibm.map" "" \ +"qwerty/it.map" "" \ +"qwerty/it2.map" "" \ +"qwerty/jp106.map" "" \ +"qwerty/kazakh.map" "" \ +"qwerty/ky_alt_sh-UTF-8.map" "" \ +"qwerty/kyrgyz.map" "" \ +"qwerty/la-latin1.map" "" \ +"qwerty/lt.baltic.map" "" \ +"qwerty/lt.l4.map" "" \ +"qwerty/lt.map" "" \ +"qwerty/mk-cp1251.map" "" \ +"qwerty/mk-utf.map" "" \ +"qwerty/mk.map" "" \ +"qwerty/mk0.map" "" \ +"qwerty/nl.map" "" \ +"qwerty/nl2.map" "" \ +"qwerty/no-latin1.map" "" \ +"qwerty/no.map" "" \ +"qwerty/pc110.map" "" \ +"qwerty/pl.map" "" \ +"qwerty/pl1.map" "" \ +"qwerty/pl2.map" "" \ +"qwerty/pl3.map" "" \ +"qwerty/pl4.map" "" \ +"qwerty/pt-latin1.map" "" \ +"qwerty/pt-latin9.map" "" \ +"qwerty/pt.map" "" \ +"qwerty/ro.map" "" \ +"qwerty/ro_std.map" "" \ +"qwerty/ru-cp1251.map" "" \ +"qwerty/ru-ms.map" "" \ +"qwerty/ru-yawerty.map" "" \ +"qwerty/ru.map" "" \ +"qwerty/ru1.map" "" \ +"qwerty/ru2.map" "" \ +"qwerty/ru3.map" "" \ +"qwerty/ru4.map" "" \ +"qwerty/ru_win.map" "" \ +"qwerty/ruwin_alt-CP1251.map" "" \ +"qwerty/ruwin_alt-KOI8-R.map" "" \ +"qwerty/ruwin_alt-UTF-8.map" "" \ +"qwerty/ruwin_cplk-CP1251.map" "" \ +"qwerty/ruwin_cplk-KOI8-R.map" "" \ +"qwerty/ruwin_cplk-UTF-8.map" "" \ +"qwerty/ruwin_ct_sh-CP1251.map" "" \ +"qwerty/ruwin_ct_sh-KOI8-R.map" "" \ +"qwerty/ruwin_ct_sh-UTF-8.map" "" \ +"qwerty/ruwin_ctrl-CP1251.map" "" \ +"qwerty/ruwin_ctrl-KOI8-R.map" "" \ +"qwerty/ruwin_ctrl-UTF-8.map" "" \ +"qwerty/se-fi-ir209.map" "" \ +"qwerty/se-fi-lat6.map" "" \ +"qwerty/se-ir209.map" "" \ +"qwerty/se-lat6.map" "" \ +"qwerty/se-latin1.map" "" \ +"qwerty/sk-prog-qwerty.map" "" \ +"qwerty/sk-qwerty.map" "" \ +"qwerty/speakup-jfw.map" "" \ +"qwerty/speakupmap.map" "" \ +"qwerty/sr-cy.map" "" \ +"qwerty/sv-latin1.map" "" \ +"qwerty/tj_alt-UTF8.map" "" \ +"qwerty/tr_q-latin5.map" "" \ +"qwerty/tralt.map" "" \ +"qwerty/trf.map" "" \ +"qwerty/trq.map" "" \ +"qwerty/ttwin_alt-UTF-8.map" "" \ +"qwerty/ttwin_cplk-UTF-8.map" "" \ +"qwerty/ttwin_ct_sh-UTF-8.map" "" \ +"qwerty/ttwin_ctrl-UTF-8.map" "" \ +"qwerty/ua-cp1251.map" "" \ +"qwerty/ua-utf-ws.map" "" \ +"qwerty/ua-utf.map" "" \ +"qwerty/ua-ws.map" "" \ +"qwerty/ua.map" "" \ +"qwerty/uk.map" "" \ +"qwerty/us-acentos.map" "" \ +"qwerty/us.map" "" \ +"qwertz/croat.map" "" \ +"qwertz/cz-us-qwertz.map" "" \ +"qwertz/cz.map" "" \ +"qwertz/de-latin1-nodeadkeys.map" "" \ +"qwertz/de-latin1.map" "" \ +"qwertz/de-mobii.map" "" \ +"qwertz/de.map" "" \ +"qwertz/de_CH-latin1.map" "" \ +"qwertz/de_alt_UTF-8.map" "" \ +"qwertz/fr_CH-latin1.map" "" \ +"qwertz/fr_CH.map" "" \ +"qwertz/hu.map" "" \ +"qwertz/sg-latin1-lk450.map" "" \ +"qwertz/sg-latin1.map" "" \ +"qwertz/sg.map" "" \ +"qwertz/sk-prog-qwertz.map" "" \ +"qwertz/sk-qwertz.map" "" \ +"qwertz/slovene.map" "" \ + 2> $TMP/SeTkeymap + if [ ! $? = 0 ]; then + rm -f $TMP/SeTkeymap + exit + fi + MAPNAME="`cat $TMP/SeTkeymap`" + MAPNAME="`basename $MAPNAME`" + echo $MAPNAME > $TMP/SeTkeymap + BMAP="`basename $MAPNAME .map`.bmap" + tar xzOf /etc/keymaps.tar.gz $BMAP > /dev/null && tar xzOf /etc/keymaps.tar.gz $BMAP | loadkmap + + while [ 0 ]; do + # Match the dialog colors a little while doing the keyboard test: + setterm -background cyan -foreground black -blank 0 + clear + cat << EOF + + + OK, the new map is now installed. You may now test it by typing + anything you want. To quit testing the keyboard, enter 1 on a + line by itself to accept the map and go on, or 2 on a line by + itself to reject the current keyboard map and select a new one. + +EOF + echo -n " " + read REPLY + if [ "$REPLY" = "1" -o "$REPLY" = "2" ]; then + break; + fi + done + setterm -background black -foreground white -blank 0 + if [ "$REPLY" = "1" ]; then + # Make a persistent (P) copy so starting setup won't erase it: + cp $TMP/SeTkeymap $TMP/Pkeymap + break; + else + rm -f $TMP/$MAPNAME + rm -f $TMP/SeTkeymap $TMP/Pkeymap + # Clear bad selection: + tar xzOf /etc/keymaps.tar.gz us.bmap > /dev/null && tar xzOf /etc/keymaps.tar.gz us.bmap | loadkmap + continue; + fi +done diff --git a/source/installer/sources/initrd/usr/lib/setup/SeTmaketag b/source/installer/sources/initrd/usr/lib/setup/SeTmaketag new file mode 100755 index 000000000..18fba3af7 --- /dev/null +++ b/source/installer/sources/initrd/usr/lib/setup/SeTmaketag @@ -0,0 +1,154 @@ +#!/bin/sh +TMP=/var/log/setup/tmp +if [ ! -d $TMP ]; then + mkdir -p $TMP +fi +MOUNT=/tag +mkdir -p $MOUNT +dialog --title "CREATE CUSTOM TAGFILES" --yesno "Tagfiles are special files \ +found on the first disk of a series that can determine which packages are \ +installed and which are skipped. Deciding which files to install in advance \ +can speed up the installation process greatly. If you have not installed \ +Slackware Linux before, you should probably try installing using the \ +default tagfiles before you try making custom ones, because you won't see much \ +information about the package contents when creating your tagfiles. This \ +process assumes you already know which packages you want to install. \ +If you're not sure, back out now and just use the default tagfiles when \ +you install. \ +Do you want to create custom tagfiles?" 17 65 +if [ ! $? = 0 ]; then + exit +fi +dialog --title "ENTER CUSTOM TAGFILE EXTENSION" --inputbox "Now you must \ +enter a custom file extension. This will be used as the last part of the \ +filename for your new custom tagfiles. For example, I use '.pat' for my \ +custom extension, and my custom tagfiles on the first disk of each series \ +have the filename 'tagfile.pat'. Use any extension you like except .tgz or \ +.tar. The extension must consist of a period followed by exactly 3 \ +letters." 14 65 2> $TMP/SeTtagmake +if [ ! $? = 0 -o ! "`cat $TMP/SeTtagmake | cut -b1`" = "." -o "`cat $TMP/SeTtagmake`" = "" ]; then + rm -f $TMP/SeTtagmake + exit +fi +TAGEXT="`cat $TMP/SeTtagmake`" +dialog --title "USE EXPERT MENUS?" --menu "If you like, you may select your \ +packages from expert menus. Where the normal menu shows a choice like 'C \ +compiler system', the expert menus show you 'C libs', 'C compiler', 'C \ +include files', etc -- each individual package. Obviously, you should \ +know what you're doing if you use the expert menus since it's possible \ +to skip packages that are crucial to the functioning of a subsystem." \ +15 65 2 \ +"normal" "Use normal menus that select groups of packages" \ +"expert" "Use expert menus with a switch for each package" 2> $TMP/SeTreturn +if [ ! $? = 0 ]; then + rm -f $TMP/SeTreturn + exit +fi +MENU="`cat $TMP/SeTreturn`" +rm -f $TMP/SeTreturn +if [ "$MENU" = "normal" ]; then + MAKETAG="maketag.ez" +else + MAKETAG="maketag" +fi +while [ 0 ]; do + dialog --title "CUSTOMIZE A DISK SERIES" --menu "You may now \ +create a custom tagfile on the first disk of a disk series (make \ +sure it's not write protected!), or in the directory for such a \ +disk if you are installing from your hard drive. Select one of the \ +choices below." 13 65 3 \ +"/dev/fd0" "Create a custom tagfile on floppy drive 1" \ +"/dev/fd1" "Create a custom tagfile on floppy drive 2" \ +"Directory" "Create a tagfile in a disk's directory" 2> $TMP/SeTreturn + if [ ! $? = 0 ]; then + rm -f $TMP/SeTreturn + break + fi + CHOICE="`cat $TMP/SeTreturn`" + rm -f $TMP/SeTreturn + if [ "$CHOICE" = "/dev/fd0" -o "$CHOICE" = "/dev/fd1" ]; then + dialog --title "INSERT DISK IN DRIVE $CHOICE" --msgbox "Please insert the first disk of \ +a disk series you would like to make a custom tagfile for and press \ +ENTER. Be sure this disk is not write protected." 7 60 + if [ ! $? = 0 ]; then + continue + fi + mount $CHOICE $MOUNT -t msdos + if [ ! $? = 0 ]; then + dialog --title "MOUNT FAILURE" --msgbox "Sorry, the disk could not be \ +mounted in drive $CHOICE as type msdos." 6 60 + umount $MOUNT 2> /dev/null + continue + fi + if [ -r $MOUNT/$MAKETAG -o $MOUNT/maketag ]; then + if [ -r $MOUNT/$MAKETAG ]; then + sh $MOUNT/$MAKETAG + else + sh $MOUNT/maketag + fi + else # no tagfile create script! + dialog --title "NO TAGFILE SCRIPT" --msgbox "Sorry, but a custom tagfile \ +cannot be created for this disk because it does not have a 'maketag' script. \ +The maketag script was introduced in Slackware 1.1.2, and provides the menu \ +of packages to select from. Currently there is no way to just look at the \ +disks and 'wing it', but maybe there will be eventually. You'll have to edit \ +the tagfile on this disk manually." 11 65 + umount $MOUNT + continue + fi + if [ ! -r $TMP/SeTnewtag ]; then + umount $MOUNT + continue + fi + cp $TMP/SeTnewtag $MOUNT/tagfile$TAGEXT + if [ $? = 0 ]; then + dialog --title "TAGFILE CREATED" --msgbox "Your custom \ +tagfile has been successfully created with the extension: \ +$TAGEXT" 8 40 + else + dialog --title "COPY ERROR" --msgbox "Your custom tagfile could \ +not be copied to the disk. Please check to see if the disk is write \ +protected, or full, and then try again." 9 40 + fi + umount $MOUNT + fi + if [ "$CHOICE" = "Directory" ]; then + dialog --title "CHOOSE DIRECTORY" --inputbox "Now you must enter the \ +directory for the first disk of the series for which you would like to \ +make a custom tagfile. This directory must be mounted somewhere under \ +the current filesystem." 11 65 2> $TMP/SeTreturn + if [ ! $? = 0 ]; then + rm -f $TMP/SeTreturn + continue + fi + DIR="`cat $TMP/SeTreturn`" + rm -f $TMP/SeTreturn + if [ ! -r $DIR/maketag -a ! -r $DIR/$MAKETAG ]; then + dialog --title "NO TAGFILE SCRIPT" --msgbox "Sorry, but a custom tagfile \ +cannot be created for this disk series because the directory you gave does \ +not have a 'maketag' script. \ +The maketag script was introduced in Slackware 1.1.2, and provides the menu \ +of packages to select from. Currently there is no way to just look at the \ +packages and 'wing it', but maybe there will be eventually. You'll have to \ +edit the tagfile in this directory manually." 11 65 + continue + fi + if [ -r $DIR/$MAKETAG ]; then + sh $DIR/$MAKETAG + else + sh $DIR/maketag + fi + if [ ! -r $TMP/SeTnewtag ]; then + continue + fi + cp $TMP/SeTnewtag $DIR/tagfile$TAGEXT + if [ $? = 0 ]; then + dialog --title "TAGFILE CREATED" --msgbox "Your custom \ +tagfile has been successfully created with the extension: \ +$TAGEXT" 8 40 + else + dialog --msgbox "I don't know what just happened, but something \ +screwed up." 6 40 + fi + fi +done diff --git a/source/installer/sources/initrd/usr/lib/setup/SeTmedia b/source/installer/sources/initrd/usr/lib/setup/SeTmedia new file mode 100755 index 000000000..65e05f4db --- /dev/null +++ b/source/installer/sources/initrd/usr/lib/setup/SeTmedia @@ -0,0 +1,47 @@ +#!/bin/sh +TMP=/var/log/setup/tmp +if [ ! -d $TMP ]; then + mkdir -p $TMP +fi + +dialog --backtitle "Select Slackware installation source." \ +--title "SOURCE MEDIA SELECTION" --menu \ +"Please select the media from which to install Slackware Linux:" \ +14 70 7 \ +"1" "Install from a Slackware CD or DVD" \ +"2" "Install from a Slackware USB stick" \ +"3" "Install from a hard drive partition" \ +"4" "Install from NFS (Network File System)" \ +"5" "Install from FTP/HTTP server" \ +"6" "Install from Samba share" \ +"7" "Install from a pre-mounted directory" \ +2> $TMP/media +if [ ! $? = 0 ]; then + rm $TMP/media + exit +fi + +SOURCE_MEDIA="`cat $TMP/media`" +rm -f $TMP/media +if [ "$SOURCE_MEDIA" = "1" ]; then + INSCD +elif [ "$SOURCE_MEDIA" = "2" ]; then + INSUSB +elif [ "$SOURCE_MEDIA" = "3" ]; then + INShd +elif [ "$SOURCE_MEDIA" = "4" ]; then + SeTnet + INSNFS +elif [ "$SOURCE_MEDIA" = "5" ]; then + SeTnet + INSURL +elif [ "$SOURCE_MEDIA" = "6" ]; then + SeTnet + INSSMB +elif [ "$SOURCE_MEDIA" = "7" ]; then + INSdir +fi + +# Sorry, this goes the way of the dinosaur... +#"5" "Install from floppy disks (A and N series only)" + diff --git a/source/installer/sources/initrd/usr/lib/setup/SeTnet b/source/installer/sources/initrd/usr/lib/setup/SeTnet new file mode 100755 index 000000000..0caefa64e --- /dev/null +++ b/source/installer/sources/initrd/usr/lib/setup/SeTnet @@ -0,0 +1,360 @@ +#!/bin/sh +# This script will be called with the single argument of "boot" during the +# system startup, to allow for unattended network configuration. +# For this to work, all required information must be passed on the commandline. +# Two parameters, 'kbd=' and 'nic=' must be used to supply this information. +# kbd=<keyboard_layout> +# nic=<driver>:<interface>:<dhcp|static>[:ipaddr:netmask[:gateway]] + +TMP=/var/log/setup/tmp +T_PX="$(cat $TMP/SeTT_PX 2> /dev/null)" +if [ ! -d $TMP ]; then + mkdir -p $TMP +fi + +# Terminate the script now if we have an interface with an IP address: +# Running the script is not needed anymore in that case. +if `ip -f inet -o addr show | grep -v " lo " 1>/dev/null 2>/dev/null` ; then + exit 0 +fi + +# Function to convert the netmask from CIDR format to dot notation. +cidr_cvt() { + inform=$1 + if [ $inform -ge 32 ]; then outform='255.255.255.255' + elif [ $inform -ge 31 ]; then outform='255.255.255.254' + elif [ $inform -ge 30 ]; then outform='255.255.255.252' + elif [ $inform -ge 29 ]; then outform='255.255.255.248' + elif [ $inform -ge 28 ]; then outform='255.255.255.240' + elif [ $inform -ge 27 ]; then outform='255.255.255.224' + elif [ $inform -ge 26 ]; then outform='255.255.255.192' + elif [ $inform -ge 25 ]; then outform='255.255.255.128' + elif [ $inform -ge 24 ]; then outform='255.255.255.0' + elif [ $inform -ge 23 ]; then outform='255.255.254.0' + elif [ $inform -ge 22 ]; then outform='255.255.252.0' + elif [ $inform -ge 21 ]; then outform='255.255.248.0' + elif [ $inform -ge 20 ]; then outform='255.255.240.0' + elif [ $inform -ge 19 ]; then outform='255.255.224.0' + elif [ $inform -ge 18 ]; then outform='255.255.192.0' + elif [ $inform -ge 17 ]; then outform='255.255.128.0' + elif [ $inform -ge 16 ]; then outform='255.255.0.0' + elif [ $inform -ge 15 ]; then outform='255.254.0.0' + elif [ $inform -ge 14 ]; then outform='255.252.0.0' + elif [ $inform -ge 13 ]; then outform='255.248.0.0' + elif [ $inform -ge 12 ]; then outform='255.240.0.0' + elif [ $inform -ge 11 ]; then outform='255.224.0.0' + elif [ $inform -ge 10 ]; then outform='255.192.0.0' + elif [ $inform -ge 9 ]; then outform='255.128.0.0' + elif [ $inform -ge 8 ]; then outform='255.0.0.0' + elif [ $inform -ge 7 ]; then outform='254.0.0.0' + elif [ $inform -ge 6 ]; then outform='252.0.0.0' + elif [ $inform -ge 5 ]; then outform='248.0.0.0' + elif [ $inform -ge 4 ]; then outform='240.0.0.0' + elif [ $inform -ge 3 ]; then outform='224.0.0.0' + elif [ $inform -ge 2 ]; then outform='192.0.0.0' + elif [ $inform -ge 1 ]; then outform='128.0.0.0' + elif [ $inform -ge 0 ]; then outform='0.0.0.0' + fi + echo $outform +} + +# First, sane defaults: +INTERFACE="" +ENET_MODE="ask" +# Does the commandline have NIC information for us? +# Format is 'nic=driver:interface:<dhcp|static>:ip:mask:gw' +for CMDELEM in $(cat /proc/cmdline) ; do + if $(echo $CMDELEM | grep -q "^nic=") ; then + DRIVER=$(echo $CMDELEM | cut -f2 -d=) + INTERFACE=$(echo $DRIVER | cut -f2 -d:) + ENET_MODE=$(echo $DRIVER | cut -f3 -d:) + if [ "$ENET_MODE" = "static" ]; then + IPADDR=$(echo $DRIVER | cut -f4 -d:) + NETMASK=$(echo $DRIVER | cut -f5 -d:) + # We allow for CIDR notation of the netmask (0 < NETMASK < 25): + if [ "$(echo $NETMASK | tr -cd '\.')" != "..." ]; then + NETMASK=$(cidr_cvt $NETMASK) + fi + GATEWAY=$(echo $DRIVER | cut -f6 -d:) + fi + DRIVER=$(echo $DRIVER | cut -f1 -d:) + break + fi +done + +# If the script has an argument of 'boot' then we require all information for +# unattended network setup or else we silently exit. +if [ "$1" = "boot" ]; then + if [ "x$DRIVER" = "x" -o "x$INTERFACE" = "x" -o "$ENET_MODE" = "ask" ]; then + exit 2 + elif [ "$ENET_MODE" = "static" ] && [ "x$IPADDR" = "x" -o "x$NETMASK" = "x" ]; then + exit 2 + fi +fi + +# If the cmdline provided the name of a driver, load it; +# Alternatively check if the user ran "network" before running "setup"; +# We need an interface: +if [ `cat /proc/net/dev | grep ':' | sed -e "s/^ *//" | cut -f1 -d: | grep -v lo | wc -l` = 0 ]; then + if [ "x${DRIVER}" != "x" ]; then + # This takes silent care of 'DRIVER=auto' as well... + modprobe ${DRIVER} 1>/dev/null 2>/dev/null + else + while [ 0 ]; do + cat << EOF > $TMP/tempmsg + +You will now get a chance to probe your network interfaces. + +EOF + dialog --title "PROBING NETWORK DEVICES" --msgbox "`cat $TMP/tempmsg`" 7 68 + clear + rm -f $TMP/tempmsg + /bin/network --installer + read -p "Press any key..." JUNK + sleep 5 # Give dhcpcd a change to probe + unset JUNK + cat << EOF > $TMP/tempmsg + +Are you OK with the network interface which was detected? +If not, select 'No' to get back to the network probe program. +You can try to load another driver explicitly, +by using "P <driver_name>". + +If you are satisfied, select 'Yes' to continue with network configuration. +EOF + dialog --title "PROBING NETWORK DEVICES" --yesno "`cat $TMP/tempmsg`" 12 68 + if [ $? = 0 ]; then + rm -f $TMP/tempmsg + break + fi + clear + done + fi +fi + +# If we obtained information from a DHCP server, use it: +if [ "x$INTERFACE" = "x" -o "$INTERFACE" = "auto" ]; then + # the cmdline did not provide a nic or it's "auto" to let dhcpcd find out: + if [ "$INTERFACE" = "auto" ]; then + # hope that 3 seconds is enough for dhcpcd; + # if not then you had better specify the INTERFACE in the nic= parameter... + dialog --title "INITIALIZING NETWORK" --infobox \ + "\nWaiting a few seconds for DHCP polling to settle ..." 5 56 + sleep 3 + fi + clear + for I_I in \ + $(cat /proc/net/dev | grep ':' | sed -e "s/^ *//" | cut -f1 -d: | grep -v lo) ; + do + if [ -s /etc/dhcpc/dhcpcd-${I_I}.info ]; then + INTERFACE="${I_I}" + break + fi + done + unset I_I + if [ "$INTERFACE" = "auto" ]; then # failed to find a configured interface + INTERFACE="" + fi +fi + +while [ 0 ]; do + T_PX="$(cat $TMP/SeTT_PX 2> /dev/null)" + UPNRUN=1 + if [ "$T_PX" = "/" ]; then + cat << EOF > $TMP/tempmsg + +You're running off the hard drive filesystem. Is this machine +currently running on the network you plan to install from? If +so, we won't try to reconfigure your ethernet card. + +Are you up-and-running on the network? +EOF + dialog --title "NETWORK CONFIGURATION" --yesno "`cat $TMP/tempmsg`" 12 68 + UPNRUN=$? + clear + fi + if [ $UPNRUN = 1 ]; then + ENET_DEVICE=${INTERFACE:-"eth0"} + if [ "x$INTERFACE" != "x" ]; then # interface specified via cmdline or dhcpcd + if [ "$ENET_MODE" = "ask" ]; then + # Offer to install using DHCP: + cat << EOF > $TMP/tempmsg + +I can configure your network interface $ENET_DEVICE +fully automatically using DHCP. +If you want this, please select 'yes'. + +If you select 'no' instead, then you will be able to assign +the IP address, netmask and gateway manually. + +EOF + dialog --title "DHCP CONFIGURATION" --yesno "`cat $TMP/tempmsg`" 12 65 + if [ $? -eq 0 ]; then + rm -f $TMP/tempmsg + echo $ENET_DEVICE > $TMP/SeTdhcp + else + rm -f $TMP/SeTdhcp + fi + elif [ "$ENET_MODE" = "dhcp" ]; then # Don't ask, just use DHCP + echo $ENET_DEVICE > $TMP/SeTdhcp + fi + fi # End non-empty INTERFACE + clear + + if [ ! -r $TMP/SeTdhcp ]; then + # No DHCP configured, so use static IP. + # If we have all the values ready, don't ask any. + # Only if the script runs with the "boot" parameter will we silently accept + # an empty gateway address (if we came this far, we will have IP/netmask): + if [ "$1" = "boot" -a "x$GATEWAY" = "x" ]; then + HAVE_GATEWAY=1 + GATEWAY="unspec" + else + HAVE_GATEWAY=0 + fi + if [ "x$IPADDR" = "x" -o "x$NETMASK" = "x" -o "x$GATEWAY" = "x" ]; then + cat << EOF > $TMP/tempmsg + +You will need to enter the IP address you wish to +assign to this machine. Example: 111.112.113.114 + +What is your IP address? +EOF + if [ "$LOCAL_IPADDR" = "" ]; then # assign default + LOCAL_IPADDR=${IPADDR} + fi + dialog --title "ASSIGN IP ADDRESS" --inputbox "`cat $TMP/tempmsg`" 12 \ + 65 $LOCAL_IPADDR 2> $TMP/local + if [ ! $? = 0 ]; then + rm -f $TMP/tempmsg $TMP/local + exit + fi + LOCAL_IPADDR="`cat $TMP/local`" + rm -f $TMP/local + clear + cat << EOF > $TMP/tempmsg + +Now we need to know your netmask. +Typically this will be 255.255.255.0 +but this can be different depending on +your local setup. + +What is your netmask? +EOF + if [ "$LOCAL_NETMASK" = "" ]; then # assign default + LOCAL_NETMASK=${NETMASK:-255.255.255.0} + fi + dialog --title "ASSIGN NETMASK" --inputbox "`cat $TMP/tempmsg`" 14 \ + 65 $LOCAL_NETMASK 2> $TMP/mask + if [ ! $? = 0 ]; then + rm -f $TMP/tempmsg $TMP/mask + exit + fi + clear + LOCAL_NETMASK="`cat $TMP/mask`" + rm $TMP/mask + dialog --yesno "Do you have a gateway?" 5 30 + HAVE_GATEWAY=$? + clear + if [ "$HAVE_GATEWAY" = "0" ]; then + if [ "$LOCAL_GATEWAY" = "" ]; then + if [ "$GATEWAY" = "" ]; then + LOCAL_GATEWAY="`echo $LOCAL_IPADDR | cut -f1-3 -d '.'`." + else + LOCAL_GATEWAY=${GATEWAY} + fi + fi + dialog --title "ASSIGN GATEWAY ADDRESS" --inputbox \ + "\nWhat is the IP address for your gateway?" 9 65 \ + $LOCAL_GATEWAY 2> $TMP/gw + if [ ! $? = 0 ]; then + rm -f $TMP/tempmsg $TMP/gw + exit + fi + LOCAL_GATEWAY="`cat $TMP/gw`" + rm -f $TMP/gw + fi + clear + else + # Non-interactive run, so we use the values set on the commandline: + LOCAL_IPADDR=${IPADDR} + LOCAL_NETMASK=${NETMASK} + LOCAL_GATEWAY=${GATEWAY} + fi # end questions asked + fi # end static ip + + if [ "$ENET_MODE" = "ask" -a ! -r $TMP/SeTdhcp ]; then + cat << EOF > $TMP/tempmsg + +This is the proposed network configuration for $ENET_DEVICE - +If this is OK, then select 'Yes'. +If this is not OK and you want to configure again, select 'No'. + +* IP Address: $LOCAL_IPADDR +* Netmask: $LOCAL_NETMASK +EOF + if [ "$HAVE_GATEWAY" = 0 ]; then + echo "* Gateway: $LOCAL_GATEWAY" >> $TMP/tempmsg + fi + echo "" >> $TMP/tempmsg + dialog --no-collapse --title "NETWORK CONFIGURATION" --yesno "`cat $TMP/tempmsg`" 14 68 + if [ $? -eq 1 ]; then + continue # New round of questions + fi + fi # end ask approval for ip config + + #echo "Configuring ethernet card..." + dialog --title "INITIALIZING NETWORK" --infobox \ + "\nConfiguring your network interface $ENET_DEVICE ..." 5 56 + if [ -r $TMP/SeTdhcp ]; then + dhcpcd -k $ENET_DEVICE 1>/dev/null 2>&1 # Or else the '-T' will be used next: + sleep 3 + dhcpcd -L $ENET_DEVICE + else + dhcpcd -k $ENET_DEVICE 1>/dev/null 2>&1 # We don't need it now + # Broadcast and network are derived from IP and netmask: + LOCAL_BROADCAST=`ipmask $LOCAL_NETMASK $LOCAL_IPADDR | cut -f 1 -d ' '` + LOCAL_NETWORK=`ipmask $LOCAL_NETMASK $LOCAL_IPADDR | cut -f 2 -d ' '` + ifconfig $ENET_DEVICE $LOCAL_IPADDR netmask $LOCAL_NETMASK broadcast $LOCAL_BROADCAST + if [ "$HAVE_GATEWAY" = "0" ]; then + #echo "Configuring your gateway..." + route add default gw $LOCAL_GATEWAY metric 1 + fi + echo $LOCAL_IPADDR > $TMP/SeTIP + echo $LOCAL_NETMASK > $TMP/SeTnetmask + echo $LOCAL_GATEWAY > $TMP/SeTgateway + fi + fi # ! UPNRUN + clear + break + +done +echo $UPNRUN > $TMP/SeTupnrun + +# Basic initialisation completed. Let's see what the commandline has for us: +# If we know of a remote configuration file, get it now: +# Provide comma-separated values (protocol,remoteserver[:portnumber],configfile) +# like this example: 'cf=tftp,192.168.0.22,/slackware-12.1/configs/t43.cfg' +for CMDELEM in $(cat /proc/cmdline) ; do + if $(echo $CMDELEM | grep -q "^cf=") ; then + CONFIGFILE=$(echo $CMDELEM | cut -f2 -d=) + PROTO=$(echo $CONFIGFILE | cut -f1 -d,) + DLSERVER=$(echo $CONFIGFILE | cut -f2 -d,) + CONFIGFILE=$(echo $CONFIGFILE | cut -f3 -d,) + dialog --title "FETCHING CONFIGURATION" --infobox \ + "\nAttempting to fetch a remote configuration file using $PROTO ..." 54 56 + fi +done + +if [ -n "$CONFIGFILE" ]; then + if [ "$PROTO" = "tftp" ]; then + tftp -g -r $CONFIGFILE -l $TMP/Punattended $DLSERVER 1>/dev/null 2>&1 + elif [ "$PROTO" = "ftp" -o "$PROTO" = "http" ]; then + wget -q -P $TMP -O Punattended ${PROTO}://${DLSERVER}${CONFIGFILE} + fi +fi + +# Clear the screen, since it looks pretty messy due to some fun with the termcap +# over a serial console. +clear + diff --git a/source/installer/sources/initrd/usr/lib/setup/SeTnopart b/source/installer/sources/initrd/usr/lib/setup/SeTnopart new file mode 100755 index 000000000..1ac2cb0f7 --- /dev/null +++ b/source/installer/sources/initrd/usr/lib/setup/SeTnopart @@ -0,0 +1 @@ +dialog --title "ERROR: No Linux Native Partitions" --exit-label OK --textbox "/usr/lib/setup/nopartHELP" 22 74 diff --git a/source/installer/sources/initrd/usr/lib/setup/SeTpartitions b/source/installer/sources/initrd/usr/lib/setup/SeTpartitions new file mode 100755 index 000000000..34819701f --- /dev/null +++ b/source/installer/sources/initrd/usr/lib/setup/SeTpartitions @@ -0,0 +1,524 @@ +#!/bin/sh +# SeTpartition user-friendly rewrite Fri Dec 15 13:17:40 CST 1995 pjv +# Rewrite to support filesystem plugins <david@slackware.com>, 07-May-2001 +# Don't use plugins, make it work, pjv, 18-May-2001. +# Generalize tempscript creation and support JFS and XFS. pjv, 30-Mar-2002 + +TMP=/var/log/setup/tmp +NDIR=/dev/null +REDIR=/dev/tty4 +T_PX="`cat $TMP/SeTT_PX`" + +# FUNCTIONS + +# crunch() - remove extra whitespace +crunch () { + read STRING; + echo $STRING +} + +# make_btrfs( dev ) - Create a new btrfs filesystem on the named dev. +# Parameters: dev Device node to format. +make_btrfs() { + # get the size of the named partition + SIZE=`get_part_size $1` + # output a nice status message + dialog --title "FORMATTING" \ + --backtitle "Formatting $1 with filesystem btrfs." \ + --infobox "Formatting $1 \n\ +Size: $SIZE \n\ +Filesystem type: btrfs " 0 0 + # do the format + if mount | grep "$1 " 1> $NDIR 2> $NDIR ; then + umount $1 2> $NDIR + fi + mkfs.btrfs -f -d single -m single $1 1> $REDIR 2> $REDIR +} + +# make_ext2( dev, check ) - Create a new ext2 filesystem on the named +# device. +# Parameters: dev Device node to format. +# check Perform fs check (y or n) +make_ext2() { + # get the size of the named partition + SIZE=`get_part_size $1` + # output a nice status message + dialog --title "FORMATTING" \ + --backtitle "Formatting $1 with filesystem ext2." \ + --infobox "Formatting $1 \n\ +Size: $SIZE \n\ +Filesystem type: ext2" 0 0 + # do the format + if mount | grep "$1 " 1> $NDIR 2> $NDIR ; then + umount $1 2> $NDIR + fi + if [ "$2" = "y" ]; then + mkfs.ext2 -F -F -c $1 1> $REDIR 2> $REDIR + else + mkfs.ext2 -F -F $1 1> $REDIR 2> $REDIR + fi +} + +# make_ext3( dev, check ) - Create a new ext3 filesystem on the named +# device. +# Parameters: dev Device node to format. +# check Perform fs check (y or n) +make_ext3() { + # get the size of the named partition + SIZE=`get_part_size $1` + # output a nice status message + dialog --title "FORMATTING" \ + --backtitle "Formatting $1 with filesystem ext3." \ + --infobox "Formatting $1 \n\ +Size: $SIZE \n\ +Filesystem type: ext3" 0 0 + # do the format + if mount | grep "$1 " 1> $NDIR 2> $NDIR ; then + umount $1 2> $NDIR + fi + if [ "$2" = "y" ]; then + mkfs.ext3 -F -F -c $1 1> $REDIR 2> $REDIR + else + mkfs.ext3 -F -F $1 1> $REDIR 2> $REDIR + fi +} + +# make_ext4( dev, check ) - Create a new ext4 filesystem on the named +# device. +# Parameters: dev Device node to format. +# check Perform fs check (y or n) +make_ext4() { + # get the size of the named partition + SIZE=`get_part_size $1` + # output a nice status message + dialog --title "FORMATTING" \ + --backtitle "Formatting $1 with filesystem ext4." \ + --infobox "Formatting $1 \n\ +Size: $SIZE \n\ +Filesystem type: ext4" 0 0 + # do the format + if mount | grep "$1 " 1> $NDIR 2> $NDIR ; then + umount $1 2> $NDIR + fi + if [ "$2" = "y" ]; then + mkfs.ext4 -F -F -c $1 1> $REDIR 2> $REDIR + else + mkfs.ext4 -F -F $1 1> $REDIR 2> $REDIR + fi +} + +# make_jfs( dev, check ) - Create a new jfs filesystem on the named +# device. +# Parameters: dev Device node to format. +# check Perform fs check (y or n) +make_jfs() { + # get the size of the named partition + SIZE=`get_part_size $1` + # output a nice status message + dialog --title "FORMATTING" \ + --backtitle "Formatting $1 with filesystem jfs." \ + --infobox "Formatting $1 \n\ +Size: $SIZE \n\ +Filesystem type: jfs" 0 0 + # do the format + if mount | grep "$1 " 1> $NDIR 2> $NDIR ; then + umount $1 2> $NDIR + fi + if [ "$2" = "y" ]; then + mkfs.jfs -c -q $1 1> $REDIR 2> $REDIR + else + mkfs.jfs -q $1 1> $REDIR 2> $REDIR + fi +} + +# make_reiserfs( dev ) - Create a new reiserfs filesystem on the named dev. +# Parameters: dev Device node to format. +make_reiserfs() { + # get the size of the named partition + SIZE=`get_part_size $1` + # output a nice status message + dialog --title "FORMATTING" \ + --backtitle "Formatting $1 with filesystem reiserfs." \ + --infobox "Formatting $1 \n\ +Size: $SIZE \n\ +Filesystem type: reiserfs " 0 0 + # do the format + if mount | grep "$1 " 1> $NDIR 2> $NDIR ; then + umount $1 2> $NDIR + fi + echo "y" | mkreiserfs $1 1> $REDIR 2> $REDIR +} + +# make_xfs( dev ) - Create a new xfs filesystem on the named dev +# Parameters: dev Device node to format. +make_xfs() { + # get the size of the named partition + SIZE=`get_part_size $1` + # output a nice status message + dialog --title "FORMATTING" \ + --backtitle "Formatting $1 with filesystem xfs." \ + --infobox "Formatting $1 \n\ +Size: $SIZE \n\ +Filesystem type: xfs " 0 0 + # do the format + if mount | grep "$1 " 1> $NDIR 2> $NDIR ; then + umount $1 2> $NDIR + fi + mkfs.xfs -f $1 1> $REDIR 2> $REDIR +} + +# gen_part_list() - Prints out a partition listing for the system into the +gen_part_list() { + export COUNT=0 + cat $TMP/SeTplist | while [ 0 ]; do + read PARTITION; + if [ "$PARTITION" = "" ]; then + break; + fi + # Variables, variables, variables + NAME=`echo $PARTITION | crunch | cut -f 1 -d ' '` + ALTNAME="" + DEVICE=`echo "$PARTITION" | tr -d "*" | crunch | cut -f 1 -d ' '` + SIZE=`get_part_size $DEVICE` + # See if this partition is in use already + if grep "$DEVICE " $TMP/SeTnative 1> $NDIR; then # it's been used + ON=`grep "$DEVICE " $TMP/SeTnative | crunch | cut -f 2 -d ' '` + ALTNAME="$DEVICE on $ON Linux ${SIZE}" + fi + # Add a menu item + if [ "$ALTNAME" = "" ]; then + echo "\"$NAME\" \"Linux ${SIZE}\" \\" >> $TMP/tempscript + echo "false" > $TMP/SeTSKIP # this flag is used for non-root parts + else + echo "\"(IN USE)\" \"$ALTNAME\" \\" >> $TMP/tempscript + fi + done + echo "\"---\" \"(done adding partitions, continue with setup)\" \\" >> $TMP/tempscript + echo "\"---\" \"(done adding partitions, continue with setup)\" \\" >> $TMP/tempscript + echo "\"---\" \"(done adding partitions, continue with setup)\" \\" >> $TMP/tempscript + echo "\"---\" \"(done adding partitions, continue with setup)\" \\" >> $TMP/tempscript + echo "\"---\" \"(done adding partitions, continue with setup)\" \\" >> $TMP/tempscript + echo "2> $TMP/return" >> $TMP/tempscript +} + +# ask_format( dev ) - Asks the user if he/she wants to format the named device +ask_format() { + dialog --backtitle "Do you want to format Linux partition ${1}?" \ + --title "FORMAT PARTITION $1" --menu "If this partition has \ +not been formatted, you should format it. NOTE: This will erase all data on \ +it. Would you like \ +to format this partition?" 12 70 3 \ + "Format" "Quick format with no bad block checking" \ + "Check" "Slow format that checks for bad blocks" \ + "No" "No, do not format this partition" 2> $TMP/return + if [ ! $? = 0 ]; then + rm -f $TMP/return + exit + fi +} + +# ask_fs( dev ) - Asks the user the type of filesystem to use for the named +# device. Answer in $TMP/return +ask_fs() { + unset BTRFS EXT2 EXT3 JFS REISERFS XFS + if grep -wq ext2 /proc/filesystems 1> $NDIR 2> $NDIR ; then + EXT2="Ext2 is the traditional Linux file system and is fast and stable. " + fi + if grep -wq ext3 /proc/filesystems 1> $NDIR 2> $NDIR ; then + EXT3="Ext3 is the journaling version of the Ext2 filesystem. " + DEFAULT=ext3 + fi + if grep -wq ext4 /proc/filesystems 1> $NDIR 2> $NDIR ; then + EXT4="Ext4 is the successor to the ext3 filesystem. " + DEFAULT=ext4 + fi + if grep -wq reiserfs /proc/filesystems 1> $NDIR 2> $NDIR ; then + REISERFS="ReiserFS is a journaling filesystem that stores all files and filenames in a balanced tree structure. " + fi + if grep -wq btrfs /proc/filesystems 1> $NDIR 2> $NDIR ; then + BTRFS="Btrfs is a B-tree copy-on-write filesystem. " + fi + # These last two will only be present if the user asked for a special kernel. + # They should probably be the default in that case. + if grep -wq jfs /proc/filesystems 1> $NDIR 2> $NDIR ; then + JFS="JFS is IBM's Journaled Filesystem, currently used in IBM enterprise servers. " + fi + if grep -wq xfs /proc/filesystems 1> $NDIR 2> $NDIR ; then + XFS="XFS is SGI's journaling filesystem that originated on IRIX. " + fi + cat << EOF > $TMP/tempscript +dialog --title "SELECT FILESYSTEM FOR $1" \\ +--backtitle "Partition $1 will be formatted." \\ +--default-item $DEFAULT --menu \\ +"Please select the type of filesystem to use for the specified \\ +device. Here are descriptions of the available filesystems: $EXT2 $EXT3 $EXT4 $JFS $REISERFS $XFS" \\ +0 0 0 \\ +EOF + if [ ! "$EXT2" = "" ]; then + echo "\"ext2\" \"Standard Linux Ext2 Filesystem\" \\" >> $TMP/tempscript + fi + if [ ! "$EXT3" = "" ]; then + echo "\"ext3\" \"Ext3 Journaling Filesystem\" \\" >> $TMP/tempscript + fi + if [ ! "$EXT4" = "" ]; then + echo "\"ext4\" \"Ext4 Journaling Filesystem\" \\" >> $TMP/tempscript + fi + if [ ! "$JFS" = "" ]; then + echo "\"jfs\" \"IBM's Journaled Filesystem\" \\" >> $TMP/tempscript + fi + if [ ! "$REISERFS" = "" ]; then + echo "\"reiserfs\" \"ReiserFS Journaling Filesystem\" \\" >> $TMP/tempscript + fi + if [ ! "$BTRFS" = "" ]; then + echo "\"btrfs\" \"Btrfs Copy-on-Write B-tree Filesystem\" \\" >> $TMP/tempscript + fi + if [ ! "$XFS" = "" ]; then + echo "\"xfs\" \"SGI's Journaling Filesystem\" \\" >> $TMP/tempscript + fi + echo "2> $TMP/return" >> $TMP/tempscript + . $TMP/tempscript + if [ ! $? = 0 ]; then + rm -f $TMP/return + exit + fi +} + +# get_part_size( dev ) - Return the size in K, M, G, T, or P of the named partition. +get_part_size() { + numfmt --to=iec $(blockdev --getsize64 $1) +} + +# MAIN + +if [ ! -d $TMP ]; then + mkdir -p $TMP +fi + +if [ ! -r $TMP/SeTplist ]; then + # Give warning? + exit +fi + +cat /dev/null >> $TMP/SeTnative + +cat << EOF > $TMP/tempscript +dialog --backtitle "Setting up root Linux partition." \\ +--title "Select Linux installation partition:" --ok-label Select --cancel-label Continue --menu \\ +"Please select a partition from the following list to use for your \\ +root (/) Linux partition." 13 70 5 \\ +EOF +gen_part_list + +. $TMP/tempscript +if [ ! $? = 0 ]; then + rm $TMP/tempscript + exit 255 # user abort +fi + +ROOT_DEVICE="`cat $TMP/return`" +rm $TMP/tempscript +if [ "$ROOT_DEVICE" = "---" ]; then + exit 255 +fi + +# format root partition? +ask_format $ROOT_DEVICE +DOFORMAT="`cat $TMP/return`" +rm -f $TMP/return +if [ ! "$DOFORMAT" = "No" ]; then + ask_fs $ROOT_DEVICE + ROOT_SYS_TYPE="`cat $TMP/return`" + rm -f $TMP/return + # create the filesystem + if [ "$ROOT_SYS_TYPE" = "ext2" ]; then + if [ "$DOFORMAT" = "Check" ]; then + make_ext2 $ROOT_DEVICE "y" + else + make_ext2 $ROOT_DEVICE "n" + fi + elif [ "$ROOT_SYS_TYPE" = "ext3" ]; then + if [ "$DOFORMAT" = "Check" ]; then + make_ext3 $ROOT_DEVICE "y" + else + make_ext3 $ROOT_DEVICE "n" + fi + elif [ "$ROOT_SYS_TYPE" = "ext4" ]; then + if [ "$DOFORMAT" = "Check" ]; then + make_ext4 $ROOT_DEVICE "y" + else + make_ext4 $ROOT_DEVICE "n" + fi + elif [ "$ROOT_SYS_TYPE" = "reiserfs" ]; then + make_reiserfs $ROOT_DEVICE + elif [ "$ROOT_SYS_TYPE" = "btrfs" ]; then + make_btrfs $ROOT_DEVICE + elif [ "$ROOT_SYS_TYPE" = "jfs" ]; then + if [ "$DOFORMAT" = "Check" ]; then + make_jfs $ROOT_DEVICE "y" + else + make_jfs $ROOT_DEVICE "n" + fi + elif [ "$ROOT_SYS_TYPE" = "xfs" ]; then + make_xfs $ROOT_DEVICE + fi +fi # DOFORMAT? + +# Sync before identifying and mounting the root device: +sync + +# Determine the filesystem type using blkid: +ROOT_SYS_TYPE=$(blkid -s TYPE $ROOT_DEVICE | cut -f 2 -d = | tr -d \") + +# Mount the root filesystem: +mount $ROOT_DEVICE $T_PX -t $ROOT_SYS_TYPE 1> $REDIR 2> $REDIR + +#echo "$ROOT_DEVICE / $ROOT_SYS_TYPE defaults 1 1" > $TMP/SeTnative +printf "%-16s %-16s %-11s %-16s %-3s %s\n" "$ROOT_DEVICE" "/" "$ROOT_SYS_TYPE" "defaults" "1" "1" > $TMP/SeTnative +echo $ROOT_DEVICE > $TMP/SeTrootdev + +# done mounting the target root partition + +# More than one Linux partition +if [ ! "`cat $TMP/SeTplist | sed -n '2 p'`" = "" ]; then + while [ 0 ]; do # next partition loop + # OK, we will set this flag, and if we find an unused partition, we + # change it. If it doesn't get switched, we skip the next menu. + rm -f $TMP/SeTSKIP + echo "true" > $TMP/SeTSKIP + + cat << EOF > $TMP/tempscript + dialog --backtitle "Setting up other Linux partitions." \\ +--title "Select other Linux partitions for /etc/fstab" \\ +--ok-label Select --cancel-label Continue \\ +--menu "You seem to have more than one partition tagged as type Linux. \\ +You may use these to distribute your Linux system across more than \\ +one partition. Currently, you have $ROOT_DEVICE mounted as your / partition. \\ +You might want to mount directories such as /home or /usr/local \\ +on separate partitions. You should not try to mount /etc, /sbin, or /bin on \\ +their own partitions since they contain utilities needed to bring the system \\ +up and mount partitions. Also, do not reuse a partition that you've already \\ +entered before. Please select one of the Linux partitions listed below, or \\ +if you're done, hit <Continue>." 20 70 4 \\ +EOF + gen_part_list + + if [ "`cat $TMP/SeTSKIP`" = "true" ]; then + break; + fi + rm -rf $TMP/return + + . $TMP/tempscript + if [ ! $? = 0 ]; then + break; + fi + + NEXT_PARTITION=`cat $TMP/return` + if [ "$NEXT_PARTITION" = "---" ]; then + break; + elif [ "$NEXT_PARTITION" = "(IN USE)" ]; then + continue; + fi + + # We now have the next partition, ask the user what to do with it: + ask_format $NEXT_PARTITION + + DOFORMAT="`cat $TMP/return`" + rm -f $TMP/return + + BACKT="Partition $NEXT_PARTITION will not be reformatted." + if [ ! "$DOFORMAT" = "No" ]; then + ask_fs $NEXT_PARTITION + NEXT_SYS_TYPE="`cat $TMP/return`" + rm -f $TMP/return + BACKT="Partition $NEXT_PARTITION will be formatted with $NEXT_SYS_TYPE." + # create the filesystem + if [ "$NEXT_SYS_TYPE" = "ext2" ]; then + if [ "$DOFORMAT" = "Check" ]; then + make_ext2 $NEXT_PARTITION "y" + else + make_ext2 $NEXT_PARTITION "n" + fi + elif [ "$NEXT_SYS_TYPE" = "ext3" ]; then + if [ "$DOFORMAT" = "Check" ]; then + make_ext3 $NEXT_PARTITION "y" + else + make_ext3 $NEXT_PARTITION "n" + fi + elif [ "$NEXT_SYS_TYPE" = "ext4" ]; then + if [ "$DOFORMAT" = "Check" ]; then + make_ext4 $NEXT_PARTITION "y" + else + make_ext4 $NEXT_PARTITION "n" + fi + elif [ "$NEXT_SYS_TYPE" = "reiserfs" ]; then + make_reiserfs $NEXT_PARTITION + elif [ "$NEXT_SYS_TYPE" = "btrfs" ]; then + make_btrfs $NEXT_PARTITION + elif [ "$NEXT_SYS_TYPE" = "jfs" ]; then + if [ "$DOFORMAT" = "Check" ]; then + make_jfs $NEXT_PARTITION "y" + else + make_jfs $NEXT_PARTITION "n" + fi + elif [ "$NEXT_SYS_TYPE" = "xfs" ]; then + make_xfs $NEXT_PARTITION + fi + fi # DOFORMAT? + + # Now ask the user where to mount this new filesystem: + dialog --backtitle "$BACKT" --title \ +"SELECT MOUNT POINT FOR $NEXT_PARTITION" --inputbox \ +"OK, now you need to specify where you want the new partition mounted. \ +For example, if you want to put it under /usr/local, then respond: /usr/local\n\ +Where would you like to mount $NEXT_PARTITION?" 11 59 2> $TMP/return + if [ ! $? = 0 ]; then + continue + fi + + MTPT=`cat $TMP/return` + if [ "$MTPT" = "" ]; then # abort if blank + continue + fi + if [ "`echo "$MTPT" | cut -b1`" = " " ]; then # bail if 1st char is space + continue + fi + if [ ! "`echo "$MTPT" | cut -b1`" = "/" ]; then # add / to start of path + MTPT="/$MTPT" + fi + rm $TMP/return + + # Sync before identifying and mounting the partition: + sync + + # Create the mount point if it does not exist: + if [ ! -d ${T_PX}/$MTPT ]; then + mkdir -p ${T_PX}/$MTPT + fi + + # Determine the filesystem type using blkid: + NEXT_SYS_TYPE=$(blkid -s TYPE $NEXT_PARTITION | cut -f 2 -d = | tr -d \") + + # Mount the partition: + mount $NEXT_PARTITION ${T_PX}/$MTPT -t $NEXT_SYS_TYPE 1> $REDIR 2> $REDIR + + #echo "$NEXT_PARTITION $MTPT $NEXT_SYS_TYPE defaults 1 1" >> $TMP/SeTnative + printf "%-16s %-16s %-11s %-16s %-3s %s\n" "$NEXT_PARTITION" "$MTPT" "$NEXT_SYS_TYPE" "defaults" "1" "2" >> $TMP/SeTnative + done # next partition loop +fi # more than one Linux partition + +# Done, report to the user: +cat << EOF > $TMP/tempmsg + +Adding this information to your /etc/fstab: + +EOF +cat $TMP/SeTnative >> $TMP/tempmsg +dialog --backtitle "Finished setting up Linux partitions." \ +--title "DONE ADDING LINUX PARTITIONS TO /etc/fstab" \ +--exit-label OK \ +--textbox $TMP/tempmsg 15 72 + +## More obsolete code from the floppy disk era: +## Now, move our /tmp storage onto the target partition if possible: +#/usr/lib/setup/migrate.sh + diff --git a/source/installer/sources/initrd/usr/lib/setup/SeTpasswd b/source/installer/sources/initrd/usr/lib/setup/SeTpasswd new file mode 100755 index 000000000..967ffd2ed --- /dev/null +++ b/source/installer/sources/initrd/usr/lib/setup/SeTpasswd @@ -0,0 +1,30 @@ +#!/bin/sh +TMP=/var/log/setup/tmp +if [ ! -d $TMP ]; then + mkdir -p $TMP +fi +T_PX="`cat $TMP/SeTT_PX`" +while [ "`cat $T_PX/etc/shadow | grep 'root:' | cut -f 2 -d :`" = "" ]; do + # There is no root password + dialog --title "WARNING: NO ROOT PASSWORD DETECTED" --yesno "There is \ +currently no password set on the system administrator account (root). \ +It is recommended that you set one now so that it is active the first \ +time the machine is rebooted. This is especially important if you're \ +using a network enabled kernel and the machine is on an Internet \ +connected LAN. Would you like to set a root password?" 10 68 + if [ $? = 0 ] ; then + echo + echo + echo + chroot $T_PX /usr/bin/passwd root + echo + echo -n "Press [enter] to continue:" + read junk; + echo + # Here we drop through, and if there's still no password the menu + # runs again. + else + # Don't set a password: + break; + fi +done diff --git a/source/installer/sources/initrd/usr/lib/setup/SeTpxe b/source/installer/sources/initrd/usr/lib/setup/SeTpxe new file mode 100755 index 000000000..55c8a83bf --- /dev/null +++ b/source/installer/sources/initrd/usr/lib/setup/SeTpxe @@ -0,0 +1,315 @@ +#!/bin/sh +# +# Copyright 2011 Eric Hameleers, Eindhoven, NL +# Copyright 2011 Patrick Volkerding, Sebeka, Minnesota USA +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# Bug reports, suggestions, etc for pxesetup: alien@slackware.com +# +TMP=/var/log/setup/tmp +if [ ! -d $TMP ]; then + mkdir -p $TMP +fi + +# Function to convert the netmask from CIDR format to dot notation. +cidr_cvt() { + inform=$1 + if [ $inform -ge 32 ]; then outform='255.255.255.255' + elif [ $inform -ge 31 ]; then outform='255.255.255.254' + elif [ $inform -ge 30 ]; then outform='255.255.255.252' + elif [ $inform -ge 29 ]; then outform='255.255.255.248' + elif [ $inform -ge 28 ]; then outform='255.255.255.240' + elif [ $inform -ge 27 ]; then outform='255.255.255.224' + elif [ $inform -ge 26 ]; then outform='255.255.255.192' + elif [ $inform -ge 25 ]; then outform='255.255.255.128' + elif [ $inform -ge 24 ]; then outform='255.255.255.0' + elif [ $inform -ge 23 ]; then outform='255.255.254.0' + elif [ $inform -ge 22 ]; then outform='255.255.252.0' + elif [ $inform -ge 21 ]; then outform='255.255.248.0' + elif [ $inform -ge 20 ]; then outform='255.255.240.0' + elif [ $inform -ge 19 ]; then outform='255.255.224.0' + elif [ $inform -ge 18 ]; then outform='255.255.192.0' + elif [ $inform -ge 17 ]; then outform='255.255.128.0' + elif [ $inform -ge 16 ]; then outform='255.255.0.0' + elif [ $inform -ge 15 ]; then outform='255.254.0.0' + elif [ $inform -ge 14 ]; then outform='255.252.0.0' + elif [ $inform -ge 13 ]; then outform='255.248.0.0' + elif [ $inform -ge 12 ]; then outform='255.240.0.0' + elif [ $inform -ge 11 ]; then outform='255.224.0.0' + elif [ $inform -ge 10 ]; then outform='255.192.0.0' + elif [ $inform -ge 9 ]; then outform='255.128.0.0' + elif [ $inform -ge 8 ]; then outform='255.0.0.0' + elif [ $inform -ge 7 ]; then outform='254.0.0.0' + elif [ $inform -ge 6 ]; then outform='252.0.0.0' + elif [ $inform -ge 5 ]; then outform='248.0.0.0' + elif [ $inform -ge 4 ]; then outform='240.0.0.0' + elif [ $inform -ge 3 ]; then outform='224.0.0.0' + elif [ $inform -ge 2 ]; then outform='192.0.0.0' + elif [ $inform -ge 1 ]; then outform='128.0.0.0' + elif [ $inform -ge 0 ]; then outform='0.0.0.0' + fi + echo $outform +} + +# IP Address to integer conversion and back: +ip_to_int() { + IFS=. + set -f + set -- $1 + echo $(($1 << 24 | $2 << 16 | $3 << 8 | $4)) +} +int_to_ip() { + echo $(($1>>24)).$(($1>>16&0xff)).$(($1>>8&0xff)).$(($1&0xff)) +} + +# PXE configuration file: +echo "" > $TMP/SeTpxe + +# Find out what interface we are using. +# Does the commandline have NIC information for us? +# Format is 'nic=driver:interface:<dhcp|static>:ip:mask:gw' +unset INTERFACE +for CMDELEM in $(cat /proc/cmdline) ; do + if $(echo $CMDELEM | grep -q "^nic=") ; then + INTERFACE=$(echo $DRIVER | cut -f2 -d:) + fi +done +if [ "x$INTERFACE" = "x" ]; then # the cmdline did not provide a nic + INTERFACE=$(ip -f inet -o addr show |tr -s ' ' |grep -v " lo " |cut -f2 -d' ' |head -1) +fi +if [ "x$INTERFACE" = "x" ]; then # no network was configured at all?!? + cat <<EOF > $TMP/tempmsg + +Apparently you forgot to configure a network interface? \n\ +A PXE Server needs a configured network interface to work.\n\ +Please try again! + +EOF + dialog --title "UNCONFIGURED NETWORK DEVICE" --msgbox "$(cat $TMP/tempmsg)" 9 68 + rm -f $TMP/tempmsg + exit 1 +fi + +# If there is a DHCP server on the network, we should not activate one now: +if [ -r $TMP/Pdhcp ]; then + DHCP="no" +elif [ -s /etc/dhcpc/dhcpcd-${INTERFACE}.info ]; then + DHCP="no" +else + # Assume nothing... we will ask the user for confirmation later! + DHCP="yes" +fi + +# Start the interactive part: +dialog --backtitle "Slackware PXE Server." \ + --title "WELCOME TO PXE CONFIGURATION" --msgbox "\ +We will be asking you a few questions now.\n\ +The answers will be used to start a PXE service on this computer \ +which does not interfere with other services in your network.\ +\n\ +The only assumption is, that there is NO PXE service running \ +on your local network at this moment. +\n\ +If in doubt, leave the defaults." 0 0 + +if [ "$DHCP" = "yes" ]; then + # Be extra safe. Do not start a DHCP server if the user denies it: + dialog --title "ENABLE DHCP SERVER" --yesno " \ +No active DHCP server was found on your local network. \ +The Slackware PXE server needs a working DHCP server.\n\ +Do you want this computer to start its own DHCP server \ +(you can control what IP addresses are used by the DHCP server)?\n\ +Say 'YES' if you are certain your network has no DHCP server." 9 68 + if [ $? = 0 ]; then + DHCP="yes" + else + DHCP="no" + fi +fi + +# Assemble the network parameters: +LOCAL_IPADDR=$(ip -f inet -o addr show |tr -s ' ' |grep -v " lo " |head -1 |cut -f4 -d' ' |cut -f1 -d/) +LOCAL_NETMASK=$(ip -f inet -o addr show |tr -s ' ' |grep -v " lo " |head -1 |cut -f4 -d' ' |cut -f2 -d/) +LOCAL_GATEWAY=$(ip -f inet -o route show default |tr -s ' ' |cut -f3 -d' ') +LOCAL_NETMASK=$(cidr_cvt $LOCAL_NETMASK) +LOCAL_BROADCAST=$(ipmask $LOCAL_NETMASK $LOCAL_IPADDR |cut -f 1 -d ' ') +LOCAL_NETWORK=$(ipmask $LOCAL_NETMASK $LOCAL_IPADDR |cut -f 2 -d ' ') + +if [ "$DHCP" = "yes" ]; then + # Find out a suitable IP address range for the DHCP server. Involves magic: + I_LOCAL_IPADDR=$(ip_to_int "$LOCAL_IPADDR") + I_LOCAL_NETMASK=$(ip_to_int "$LOCAL_NETMASK") + I_MINLEASE_IP=$(( ($I_LOCAL_IPADDR & $I_LOCAL_NETMASK) + 1 )) + I_MAXLEASE_IP=$(( ($I_LOCAL_IPADDR | ${I_LOCAL_NETMASK}^0xffffffff) - 1 )) + if [ $(($I_MAXLEASE_IP - $I_LOCAL_IPADDR)) -ge 10 ]; then + # Use ten IP addresses in the top of the address range: + I_MINLEASE_IP=$(($I_MAXLEASE_IP - 9)) + elif [ $(($I_LOCAL_IPADDR - $I_MINLEASE_IP)) -ge 10 ]; then + # Use ten IP addresses in the bottom of the address range: + I_MAXLEASE_IP=$(($I_MINLEASE_IP + 9)) + else + # Small range, use what we can get: + I_MINLEASE_IP=$(($I_LOCAL_IPADDR + 1)) + fi + + MINLEASE_IP=$(int_to_ip "$I_MINLEASE_IP") + MAXLEASE_IP=$(int_to_ip "$I_MAXLEASE_IP") + + while [ 0 ]; do + ( dialog --stdout --backtitle "Slackware PXE Server." \ + --title "DHCP SERVER CONFIGURATION" \ + --cancel-label Restart \ + --form "\ +The PXE Service is going to run on $INTERFACE with these values \ +(the defaults should be OK). \n\ +You can change the range of IP addresses used by the DHCP server, if \ +IP addresses in the proposed range are used by computers in your LAN. \ +For instance, your default gateway if you have one. \n\ +\n\ +Also note that we will not validate any changes you make:" \ + 18 68 0 \ + "IP Address:" 1 1 "$LOCAL_IPADDR" 1 30 0 0 \ + "Netmask:" 2 1 "$LOCAL_NETMASK" 2 30 0 0 \ + "Gateway:" 3 1 "$LOCAL_GATEWAY" 3 30 0 0 \ + "Lowest DHCP Client Address:" 4 1 "$MINLEASE_IP" 4 30 15 0 \ + "Highest DHCP Client Address:" 5 1 "$MAXLEASE_IP" 5 30 15 0 \ + ) > $TMP/tempopts + + if [ $? = 0 ]; then + # Remember... busybox ash is no good with arrays :/ + local i=0 + rm $TMP/tempkeys + cat $TMP/tempopts | while read VALUE ; do + if [ $i = 0 ]; then echo "MINLEASE_IP=\"$VALUE\"" >> $TMP/tempkeys + elif [ $i = 1 ]; then echo "MAXLEASE_IP=\"$VALUE\"" >> $TMP/tempkeys + fi + i=$(expr $i + 1) + done + eval $(cat $TMP/tempkeys) + rm $TMP/tempopts + break + fi + done +fi # [ "$DHCP" = "yes" ] + +echo "DHCP=${DHCP}" >> $TMP/SeTpxe +echo "LOCAL_IPADDR=${LOCAL_IPADDR}" >> $TMP/SeTpxe +echo "LOCAL_NETMASK=${LOCAL_NETMASK}" >> $TMP/SeTpxe +echo "LOCAL_GATEWAY=${LOCAL_GATEWAY}" >> $TMP/SeTpxe +echo "LOCAL_BROADCAST=${LOCAL_BROADCAST}" >> $TMP/SeTpxe +echo "LOCAL_NETWORK=${LOCAL_NETWORK}" >> $TMP/SeTpxe +echo "MINLEASE_IP=${MINLEASE_IP}" >> $TMP/SeTpxe +echo "MAXLEASE_IP=${MAXLEASE_IP}" >> $TMP/SeTpxe + +# Write out a suitable dnsmasq configuration: +cat <<EOF > /etc/dnsmasq.conf +# We do not need dnsmasq to function as a DNS server: +port=0 + +# Write the pid file: +pid-file=/var/run/dnsmasq.pid + +# Start a TFTP server: +enable-tftp + +# Set the root directory for files available via FTP: +tftp-root=/var/lib/tftpboot + +# The boot filename: +dhcp-boot=/pxelinux.0 + +# Disable re-use of the DHCP servername and filename fields as extra +# option space. That's to avoid confusing some old or broken DHCP clients. +dhcp-no-override + +# Log connections so that we can display them on the console: +log-facility=/var/log/dnsmasq.log +log-dhcp + +# Custom path for the leases file: +dhcp-leasefile=$TMP/dnsmasq.leases + +# Craft a nice PXE menu: +pxe-prompt="Press F8 for boot menu", 3 + +# The known types are x86PC, PC98, IA64_EFI, Alpha, Arc_x86, +# Intel_Lean_Client, IA32_EFI, BC_EFI, Xscale_EFI and X86-64_EFI +pxe-service=X86PC, "Boot from network", /var/lib/tftpboot/pxelinux + +# A boot service type of 0 is special, and will abort the +# net boot procedure and continue booting from local media. +pxe-service=X86PC, "Boot from local hard disk", 0 + +EOF + +if [ -n "$LOCAL_GATEWAY" ]; then + cat <<EOF >> /etc/dnsmasq.conf +# Override the default route supplied by dnsmasq, which assumes the +# router is the same machine as the one running dnsmasq. +#dhcp-option=option:router,${LOCAL_GATEWAY} +dhcp-option=3,${LOCAL_GATEWAY} + +EOF +else + cat <<EOF >> /etc/dnsmasq.conf +# Override the default route supplied by dnsmasq and send no default +# route at all. +dhcp-option=3 + +EOF +fi + +if [ "$DHCP" = "yes" ]; then + cat <<EOF >> /etc/dnsmasq.conf +# dnsmasq functions as a normal DHCP server, providing IP leases. +dhcp-range=${MINLEASE_IP},${MAXLEASE_IP},${LOCAL_NETMASK},1h + +EOF +else + cat <<EOF >> /etc/dnsmasq.conf +# There is an existing DHCP server on this LAN, so dnsmasq functions +# as a proxy DHCP server providing boot information but no IP leases. +# Any ip in the subnet will do, so you may just put your server NIC ip here. +dhcp-range=${LOCAL_IPADDR},proxy + +EOF +fi + +# Create the pxelinux configuration file: +cat <<EOF > /var/lib/tftpboot/pxelinux.cfg/default +default huge.s +prompt 1 +timeout 1200 +display message.txt +F1 message.txt +F2 f2.txt +label huge.s + kernel kernels/huge.s/bzImage + append initrd=initrd.img load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 SLACK_KERNEL=huge.s cf=tftp,${LOCAL_IPADDR},/slackpxe.cfg +label speakup.s + kernel kernels/huge.s/bzImage + append initrd=initrd.img load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 SLACK_KERNEL=huge.s cf=tftp,${LOCAL_IPADDR},/slackpxe.cfg +label memtest + kernel kernels/memtest/memtest +EOF + +# Update the slackpxe.cfg file: +sed -i -e "s,^REMOTE_URL=.*,REMOTE_URL=http://$LOCAL_IPADDR," /var/lib/tftpboot/slackpxe.cfg + diff --git a/source/installer/sources/initrd/usr/lib/setup/SeTpxemedia b/source/installer/sources/initrd/usr/lib/setup/SeTpxemedia new file mode 100755 index 000000000..3e46fb593 --- /dev/null +++ b/source/installer/sources/initrd/usr/lib/setup/SeTpxemedia @@ -0,0 +1,95 @@ +#!/bin/sh +# +# Copyright 2011 Eric Hameleers, Eindhoven, NL +# Copyright 2011 Patrick Volkerding, Sebeka, Minnesota USA +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# Bug reports, suggestions, etc for pxesetup: alien@slackware.com +# +TMP=/var/log/setup/tmp +if [ ! -d $TMP ]; then + mkdir -p $TMP +fi + +dialog --backtitle "Select Slackware installation source." \ +--title "SOURCE MEDIA SELECTION" --menu \ +"Please select the media which contains Slackware Linux:" \ +13 70 6 \ +"1" "Use a Slackware DVD" \ +"2" "Use a hard drive partition" \ +"3" "Use a pre-mounted directory" \ +2> $TMP/pxemedia +if [ ! $? = 0 ]; then + rm $TMP/pxemedia + exit +fi + +SOURCE_MEDIA="`cat $TMP/pxemedia`" +rm -f $TMP/pxemedia +if [ "$SOURCE_MEDIA" = "1" ]; then + INSCD +elif [ "$SOURCE_MEDIA" = "2" ]; then + INShd +elif [ "$SOURCE_MEDIA" = "3" ]; then + INSdir +fi + +# Find out where the PXE boot files are on the medium. +# Note: 'isolinux' will be used on the DVD and 'syslinux' on the USB stick. +if [ -f $(readlink -f $(cat $TMP/SeTDS))/isolinux/initrd.img ]; then + SYSLINUXPATH="$(readlink -f $(cat $TMP/SeTDS))/isolinux" +elif [ -f $(readlink -f $(cat $TMP/SeTDS))/../isolinux/initrd.img ]; then + SYSLINUXPATH="$(cd $(readlink -f $(cat $TMP/SeTDS))/../isolinux ; pwd)" +elif [ -f $(readlink -f $(cat $TMP/SeTDS))/../syslinux/initrd.img ]; then + SYSLINUXPATH="$(cd $(readlink -f $(cat $TMP/SeTDS))/../syslinux ; pwd)" +elif [ -f $(readlink -f $(cat $TMP/SeTDS))/../../syslinux/initrd.img ]; then + SYSLINUXPATH="$(cd $(readlink -f $(cat $TMP/SeTDS))/../../syslinux ; pwd)" +else + SYSLINUXPATH="" +fi + +if [ -d $(readlink -f $(cat $TMP/SeTDS))/../kernels ]; then + KERNELPATH="$(cd $(readlink -f $(cat $TMP/SeTDS))/../kernels ; pwd)" +elif [ -d $(readlink -f $(cat $TMP/SeTDS))/../../kernels ]; then + KERNELPATH="$(cd $(readlink -f $(cat $TMP/SeTDS))/../../kernels ; pwd)" +elif [ -d $(readlink -f $(cat $TMP/SeTDS))/../../syslinux/kernels ]; then + KERNELPATH="$(cd $(readlink -f $(cat $TMP/SeTDS))/../../syslinux/kernels ; pwd)" +else + KERNELPATH="" +fi + +# Found them... hopefully. +if [ -n "$SYSLINUXPATH" -a -n "$KERNELPATH" ]; then + # Setup symlinks to initrd files and kernels for the PXE boot: + ( cd /var/lib/tftpboot + for FILE in $(find $SYSLINUXPATH -type f -maxdepth 1) ; do + ln -sf $FILE $(basename $FILE) + done + ln -sf $KERNELPATH kernels + ) 2>/dev/null + # Update the slackpxe.cfg file (need to strip off '/var/log/mount'): + sed -i -e "s,^REMOTE_PATH=.*,REMOTE_PATH=/$(cat $TMP/SeTDS | cut -d/ -f5-)," /var/lib/tftpboot/slackpxe.cfg +else + dialog --title "FTP/HTTP DOWNLOAD FAILURE" --msgbox "\ +Could not find the kernel and/or initial ramdisk files. \n\ +These are required for booting the client computer.\n\ +Please try to setup the SOURCE location correctly." 7 68 +fi + diff --git a/source/installer/sources/initrd/usr/lib/setup/SeTswap b/source/installer/sources/initrd/usr/lib/setup/SeTswap new file mode 100755 index 000000000..f9eb52fc8 --- /dev/null +++ b/source/installer/sources/initrd/usr/lib/setup/SeTswap @@ -0,0 +1,122 @@ +#!/bin/sh + +TMP=/var/log/setup/tmp +if [ ! -d $TMP ]; then + mkdir -p $TMP +fi +REDIR=/dev/tty4 +NDIR=/dev/null + +crunch() { + read STRING; + echo $STRING; +} + +# get_part_size( dev ) - Return the size in K, M, G, T, or P of the named partition. +get_part_size() { + numfmt --to=iec $(blockdev --getsize64 $1) +} + +rm -f $TMP/SeTswap $TMP/SeTswapskip $TMP/SeTuseswap $TMP/tmpscript + +SWAPLIST="`probe -l 2> /dev/null | grep "Linux swap" | cut -f 1 -d ' ' | sort 2> $NDIR`" + +if [ "$SWAPLIST" = "" ]; then + dialog --title "NO SWAP SPACE DETECTED" --yesno "You have not created \ +a swap partition with Linux fdisk. \ +Do you want to continue installing without one? " 6 60 + if [ "$?" = "1" ]; then + dialog --title "ABORTING INSTALLATION" --msgbox "Create a swap partition with Linux fdisk, and then try this again." \ +6 40 + else + touch $TMP/SeTswapskip + fi + exit +else # there is at least one swap partition: + # Build the swap partition selection menu: + cat << EOF > $TMP/tmpscript +dialog --backtitle "Setting up swap partitions." \\ +--title "SWAP SPACE DETECTED" --checklist \\ +"Slackware Setup has detected one or more swap partitions \\ +on your system. These partitions have been \\ +preselected to be set up as swap space. If there are any \\ +swap partitions that you \\ +do not wish to use with this installation, please unselect \\ +them with the up and down arrows and spacebar. If you wish \\ +to use all of them (this is recommended), simply hit \\ +the ENTER key." \\ +0 0 0 \\ +EOF + for swappartition in $SWAPLIST ; do + PARTSIZE=$(get_part_size $swappartition) + cat << EOF >> $TMP/tmpscript +"$swappartition" "Linux swap partition, ${PARTSIZE}" on \\ +EOF + done + cat << EOF >> $TMP/tmpscript + 2> $TMP/SeTuseswap +EOF + . $TMP/tmpscript + if [ ! $? = 0 ]; then + rm -f $TMP/tmpscript $TMP/SeTswap $TMP/SeTuseswap + touch $TMP/SeTswapskip + fi + + if [ -r $TMP/SeTuseswap ]; then + # Remove extra quotes from SeTuseswap, if any: + cat $TMP/SeTuseswap | tr -d \" > $TMP/SeTfoo + mv $TMP/SeTfoo $TMP/SeTuseswap + + # Were any swap partitions asked for? + if [ "$(cat $TMP/SeTuseswap)" = "" -a ! -r $TMP/SeTswapskip ]; then + rm -f $TMP/tmpscript $TMP/SeTswap $TMP/SeTuseswap + touch $TMP/SeTswapskip + fi + fi + + if [ ! -r $TMP/SeTswapskip ]; then + dialog --backtitle "Setting up swap partitions." \ + --title "CHECK SWAP PARTITIONS FOR BAD BLOCKS?" --defaultno --yesno \ +"Slackware Setup will now prepare your system's swap space. \ +When formatting swap partitions with mkswap you may also check \ +them for bad blocks. This is not the default since nearly all \ +modern hard drives check themselves for bad blocks anyway. \ +Would you like to check for bad blocks while running mkswap?" \ +10 60 + if [ $? = 0 ]; then + CHECKBAD=yes + else + CHECKBAD=no + fi + + # Run mkswap on swap partitions, unless they are already in use: + for swappartition in $(cat $TMP/SeTuseswap) ; do + if ! grep -w $swappartition /proc/swaps 1> $REDIR 2> $REDIR ; then + if [ "$CHECKBAD" = "no" ]; then + mkswap -v1 $swappartition 1> $REDIR 2> $REDIR + else + mkswap -c -v1 $swappartition 1> $REDIR 2> $REDIR + fi + echo "Activating swap partition ${swappartition}:" + echo "swapon ${swappartition}" + swapon $swappartition 1> $REDIR 2> $REDIR + fi + done + + # This is so people don't ask what that output was that flashed + # by on the screen. ;-) + sleep 1 + + # Add the swap partitions to the file that will go into /etc/fstab: + for swappartition in $(cat $TMP/SeTuseswap) ; do + printf "%-16s %-16s %-11s %-16s %-3s %s\n" "$swappartition" "swap" "swap" "defaults" "0" "0" >> $TMP/SeTswap + done + + echo "Your swapspace has been configured. This information will" > $TMP/swapmsg + echo "be added to your /etc/fstab:" >> $TMP/swapmsg + echo >> $TMP/swapmsg + cat $TMP/SeTswap >> $TMP/swapmsg + dialog --title "SWAP SPACE CONFIGURED" --exit-label OK --textbox $TMP/swapmsg 10 72 + rm $TMP/swapmsg + fi +fi diff --git a/source/installer/sources/initrd/usr/lib/setup/migrate.sh b/source/installer/sources/initrd/usr/lib/setup/migrate.sh new file mode 100755 index 000000000..8c1de44ae --- /dev/null +++ b/source/installer/sources/initrd/usr/lib/setup/migrate.sh @@ -0,0 +1,31 @@ +#!/bin/sh +TMP=/var/log/setup/tmp +T_PX="`cat $TMP/SeTT_PX`" +# +# Like, the space is *really* getting tight on these install disks! +# Can you believe it? Anyway, we can avoid many problems by migrating +# the $TMP directory onto the install partition ASAP. So, this script +# is run right after the TARGET partition is configured and mounted +# under ${T_PX}. +# + +TMPLINK="`LC_ALL=C /bin/ls -l /var/log/setup/tmp | tr -s ' ' | cut -f 11 -d ' '`" +if [ -L /var/log/setup/tmp -a "$TMPLINK" = "/tmp" ]; then + if mount | grep " on ${T_PX} " 1> /dev/null 2> /dev/null ; then # ${T_PX} mounted + TYPE="`mount | grep " on ${T_PX} " | cut -f 5 -d ' '`" + if [ "$TYPE" = "umsdos" ]; then + LINKDIR=${T_PX}/linux/var/log/setup/tmp + else + LINKDIR=${T_PX}/var/log/setup/tmp + fi + if [ ! -d $LINKDIR ]; then + mkdir -p $LINKDIR + chmod 700 $LINKDIR + fi + ( cd /var/log/setup + rm tmp + ln -sf $LINKDIR tmp ) + rm -f $LINKDIR/SeT* + mv /tmp/SeT* $LINKDIR + fi +fi diff --git a/source/installer/sources/initrd/usr/lib/setup/nopartHELP b/source/installer/sources/initrd/usr/lib/setup/nopartHELP new file mode 100644 index 000000000..5214a0e76 --- /dev/null +++ b/source/installer/sources/initrd/usr/lib/setup/nopartHELP @@ -0,0 +1,34 @@ + +You have not yet designated any disk partitions as type Linux. + +If you are planning to use OS/2 Boot Manager, make your Linux +partitions with OS/2 fdisk (or Partition Magic, which also +includes Boot Manager), format them, reboot this disk, and then +use Linux fdisk to tag the partitions as type 83 (Linux). + +Linux fdisk will select a default device when called without +arguments, and from there it is menu driven. If you don't want +to partition the default device, then call fdisk with the device +you want as the argument, like this: + +fdisk /dev/hdb + +or this: + +fdisk /dev/sda + +If you are not using the OS/2 Boot Manager, then you may use Linux +fdisk to create partitions for Linux. Other than the exception for +the OS/2 Boot Manager, you are usually better off creating +partitions for a given OS using a partitioning tool native to that +OS. In other words, you probably shouldn't try to make your DOS or +other non-Linux partitions with the Linux fdisk. + +"cfdisk" is an equally good version of Linux fdisk that is more +graphical and menu driven. Many people prefer to use "cfdisk". + +Please make one or more partitions for Linux, and try setup again. +If you haven't already, you might want to also make a swap partition +while you're in fdisk. 64 megabytes would be a minimum starting size +for a single user system. Linux swap is tagged as type 82. + diff --git a/source/installer/sources/initrd/usr/lib/setup/pxesetup b/source/installer/sources/initrd/usr/lib/setup/pxesetup new file mode 100755 index 000000000..fb7831a39 --- /dev/null +++ b/source/installer/sources/initrd/usr/lib/setup/pxesetup @@ -0,0 +1,120 @@ +#!/bin/sh +# +# Copyright 2011 Eric Hameleers, Eindhoven, NL +# Copyright 2011 Patrick Volkerding, Sebeka, Minnesota USA +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# Bug reports, suggestions, etc for pxesetup: alien@slackware.com +# +TMP=/var/log/setup/tmp +if [ ! -d $TMP ]; then + mkdir -p $TMP +fi +rm -f $TMP/SeT* +# If a keymap was set up, restore that data: +if [ -r $TMP/Pkeymap ]; then + cp $TMP/Pkeymap $TMP/SeTkeymap +fi +echo "on" > $TMP/SeTcolor # turn on color menus +PATH="$PATH:/usr/lib/setup" +export PATH; +export COLOR=on +# Before probing, activate any LVM partitions that may exist from +# before the boot - perhaps the Slackware tree is on a local partition: +vgchange -ay 1> /dev/null 2> /dev/null +if probe -l 2> /dev/null | grep -E 'Linux$' 1> /dev/null 2> /dev/null ; then + probe -l 2> /dev/null | grep -E 'Linux$' | sort 1> $TMP/SeTplist 2> /dev/null +fi + +while [ 0 ]; do + + dialog --title "Slackware PXE Setup (version 13.37)" \ +--menu \ +"Welcome to Slackware PXE Setup.\n\ +Select an option below using the UP/DOWN keys and SPACE or ENTER.\n\ +Alternate keys may also be used: '+', '-', and TAB." 18 72 9 \ +"HELP" "Read the Slackware PXE Setup HELP file" \ +"NETWORK" "Configure your network parameters" \ +"SOURCE" "Select source media" \ +"ACTIVATE" "Activate the Slackware PXE Server" \ +"EXIT" "Exit Slackware PXE Setup" 2> $TMP/hdset + if [ ! $? = 0 ]; then + rm -f $TMP/hdset $TMP/SeT* + exit + fi + MAINSELECT="`cat $TMP/hdset`" + rm $TMP/hdset + + # Start checking what to do. Some modules may reset MAINSELECT to run the + # next item in line. + + if [ "$MAINSELECT" = "HELP" ]; then + SeTPXEHELP + fi + + if [ "$MAINSELECT" = "NETWORK" ]; then + SeTnet + SeTpxe + if [ -r $TMP/SeTpxe ]; then + MAINSELECT="SOURCE" + fi + fi + + if [ "$MAINSELECT" = "SOURCE" ]; then + SeTpxemedia + if [ -r $TMP/SeTsource ]; then + MAINSELECT="ACTIVATE" + fi + fi + + if [ "$MAINSELECT" = "ACTIVATE" ]; then + if [ ! -r $TMP/SeTpxe -o ! -r $TMP/SeTsource ]; then + dialog --title "CANNOT START PXE SERVER YET" --msgbox "\ +\n\ +Before you can start the PXE Server, complete the following tasks:\n\ +\n\ +1. Set up your computer's network parameters.\n\ +2. Select your source media.\n\ +\n\ +Press ENTER to return to the main menu." 14 68 + continue + fi + # Time to start the BOOTP/TFTP/HTTP servers: + dnsmasq -C /etc/dnsmasq.conf + httpd -h /var/log/mount + + dialog --backtitle "Slackware PXE Server." \ + --title "PXE Client activity log" \ + --ok-label "EXIT" \ + --tailbox /var/log/dnsmasq.log 18 68 + + # Time to kill the BOOTP/TFTP/HTTP servers: + kill -TERM $(cat /var/run/dnsmasq.pid) + killall -TERM httpd + fi + + if [ "$MAINSELECT" = "EXIT" ]; then + break + fi + +done # end of main loop + +# end slackware PXE setup script + diff --git a/source/installer/sources/initrd/usr/lib/setup/setup b/source/installer/sources/initrd/usr/lib/setup/setup new file mode 100755 index 000000000..f30064a0f --- /dev/null +++ b/source/installer/sources/initrd/usr/lib/setup/setup @@ -0,0 +1,443 @@ +#!/bin/sh +# +# Copyright 1993, 1994, 1999 Patrick Volkerding, Moorhead, Minnesota USA +# Copyright 2001, 2003, 2004 Slackware Linux, Inc., Concord, CA +# Copyright 2006, 2007, 2018 Patrick Volkerding, Sebeka, Minnesota USA +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# As always, bug reports, suggestions, etc: volkerdi@slackware.com +# +TMP=/var/log/setup/tmp +if [ ! -d $TMP ]; then + mkdir -p $TMP +fi +# Wipe the probe md5sum to force rescanning partitions if setup is restarted: +rm -f $TMP/SeTpartition.md5 +## FLOPPY? Comment out this obsolete code. We ain't gonna need it. +## Use /tmp on floppy for now: +#/usr/lib/setup/unmigrate.sh +rm -f $TMP/SeT* +# If a keymap was set up, restore that data: +if [ -r $TMP/Pkeymap ]; then + cp $TMP/Pkeymap $TMP/SeTkeymap +fi +echo "on" > $TMP/SeTcolor # turn on color menus +PATH="$PATH:/usr/lib/setup" +export PATH; +export COLOR=on +dialog --backtitle "Slackware Linux Setup" --infobox "\n +Scanning your system for partition information...\n +\n" 5 55 +# In case the machine is full of fast SSDs: +sleep 1 +# Before probing, activate any LVM partitions +# that may exist from before the boot: +vgchange -ay 1> /dev/null 2> /dev/null +if probe -l 2> /dev/null | grep -E 'Linux$' 1> /dev/null 2> /dev/null ; then + probe -l 2> /dev/null | grep -E 'Linux$' | sort 1> $TMP/SeTplist 2> /dev/null +else + dialog --title "NO LINUX PARTITIONS DETECTED" \ + --msgbox "There don't seem to be any partitions on this machine of type \ +Linux. You'll need to make at least one of these to install Linux. \ +To do this, you'll need to leave 'setup', and make the partitions using \ +'cfdisk' (MBR partitions) or 'cgdisk' (GPT partitions). For more \ +information, read the 'setup' help file from the next menu." 10 64 +fi +if [ -d /sys/firmware/efi ]; then + if ! probe -l 2> /dev/null | grep "EFI System Partition" 1> /dev/null 2> /dev/null ; then + dialog --title "NO EFI SYSTEM PARTITION DETECTED" \ + --msgbox "This machine appears to be using EFI/UEFI, but no EFI System \ +Partition was found. You'll need to make an EFI System Partition in order \ +to boot from the hard drive. To do this, leave 'setup', and \ +use 'cgdisk' to make a 100MB partition of type EF00. For more information, \ +read the 'setup' help file from the next menu." 10 64 + fi +fi +T_PX="/mnt" +echo "$T_PX" > $TMP/SeTT_PX +ROOT_DEVICE="`mount | grep "on / " | cut -f 1 -d ' '`" +echo "$ROOT_DEVICE" > $TMP/SeTrootdev +if mount | grep /var/log/mount 1> /dev/null 2> /dev/null ; then # clear source + umount /var/log/mount # location +fi +# Anything mounted on /var/log/mount now is a fatal error: +if mount | grep /var/log/mount 1> /dev/null 2> /dev/null ; then + echo "Can't umount /var/log/mount. Reboot machine and run setup again." + exit +fi +# If the mount table is corrupt, the above might not do it, so we will +# try to detect Linux and FAT32 partitions that have slipped by: +if [ -d /var/log/mount/lost+found -o -d /var/log/mount/recycled \ + -o -r /var/log/mount/io.sys ]; then + echo "Mount table corrupt. Reboot machine and run setup again." + exit +fi +rm -f /var/log/mount 2> /dev/null +rmdir /var/log/mount 2> /dev/null +mkdir /var/log/mount 2> /dev/null + +while [ 0 ]; do + + dialog --title "Slackware Linux Setup (version 12.2)" \ +--menu \ +"Welcome to Slackware Linux Setup.\n\ +Select an option below using the UP/DOWN keys and SPACE or ENTER.\n\ +Alternate keys may also be used: '+', '-', and TAB." 18 72 9 \ +"HELP" "Read the Slackware Setup HELP file" \ +"KEYMAP" "Remap your keyboard if you're not using a US one" \ +"ADDSWAP" "Set up your swap partition(s)" \ +"TARGET" "Set up your target partitions" \ +"SOURCE" "Select source media" \ +"SELECT" "Select categories of software to install" \ +"INSTALL" "Install selected software" \ +"CONFIGURE" "Reconfigure your Linux system" \ +"EXIT" "Exit Slackware Linux Setup" 2> $TMP/hdset + if [ ! $? = 0 ]; then + rm -f $TMP/hdset $TMP/SeT* + exit + fi + MAINSELECT="`cat $TMP/hdset`" + rm $TMP/hdset + + # Start checking what to do. Some modules may reset MAINSELECT to run the + # next item in line. + + if [ "$MAINSELECT" = "HELP" ]; then + SeTfdHELP + fi + + if [ "$MAINSELECT" = "KEYMAP" ]; then + SeTkeymap + if [ -r $TMP/SeTkeymap ]; then + MAINSELECT="ADDSWAP" + fi + fi + + if [ "$MAINSELECT" = "MAKE TAGS" ]; then + SeTmaketag + fi + + if [ "$MAINSELECT" = "ADDSWAP" ]; then + SeTswap + if [ -r $TMP/SeTswap ]; then + MAINSELECT="TARGET" + elif [ -r $TMP/SeTswapskip ]; then + # Go ahead to TARGET without swap space: + MAINSELECT="TARGET" + fi + fi + + if [ "$MAINSELECT" = "TARGET" ]; then + SeTpartitions + SeTEFI + SeTDOS + if [ -r $TMP/SeTnative ]; then + MAINSELECT="SOURCE" + fi + fi + + if [ "$MAINSELECT" = "SOURCE" ]; then + SeTmedia + if [ -r $TMP/SeTsource ]; then + MAINSELECT="SELECT" + fi + fi + + if [ "$MAINSELECT" = "SELECT" ]; then + if [ -r /var/log/mount/isolinux/setpkg ]; then + sh /var/log/mount/isolinux/setpkg + else + SeTPKG + fi + if [ -r $TMP/SeTSERIES ]; then + MAINSELECT="INSTALL" + fi + fi + + if [ "$MAINSELECT" = "INSTALL" ]; then + if [ ! -r $TMP/SeTSERIES -o ! -r $TMP/SeTsource -o ! -r $TMP/SeTnative ]; then + dialog --title "CANNOT INSTALL SOFTWARE YET" --msgbox "\ +\n\ +Before you can install software, complete the following tasks:\n\ +\n\ +1. Select your source media.\n\ +2. Set up your target Linux partition(s).\n\ +3. Select which software categories to install.\n\ +\n\ +You may also optionally remap your keyboard and set up your\n\ +swap partition(s). \n\ +\n\ +Press ENTER to return to the main menu." 16 68 + continue + fi + SERIES="`cat $TMP/SeTSERIES`" + SOURCE_DEVICE="`cat $TMP/SeTsource`" + IGNORE_TAGFILES="" + while [ 0 ]; do + dialog --title "SELECT PROMPTING MODE" --default-item "terse" --menu \ + "Now you must select the type of prompts you'd like to see during the \ +installation process. If you have the drive space, the 'full' option \ +is quick, easy, and by far the most foolproof choice. The 'newbie' \ +mode provides the most information but is much more time-consuming \ +(presenting the packages one by one) than the menu-based choices. \ +Otherwise, you can pick packages from menus \ +using 'expert' or 'menu' mode. Which type of prompting would you like \ +to use?" \ + 20 76 7 \ + "full" "Install everything (9+ GB of software, RECOMMENDED!)" \ + "terse" "Like 'full', but display one line per package during install" \ + "menu" "Choose individual packages from interactive menus" \ + "expert" "This is actually the same as the \"menu\" option" \ + "newbie" "Use verbose prompting (the X series takes one year)" \ + "custom" "Use custom tagfiles in the package directories" \ + "tagpath" "Use tagfiles in the subdirectories of a custom path" \ + "help" "Read the prompt mode help file" 2> $TMP/SeTpmode + if [ ! $? = 0 ]; then + rm -f $TMP/SeTpmode + exit + fi + MODE="`cat $TMP/SeTpmode`" + rm -f $TMP/SeTtagext + if [ "$MODE" = "help" ]; then + dialog --title "PROMPT MODE HELP" --exit-label OK --textbox "/usr/lib/setup/PROMPThelp" 19 65 + fi + if [ "$MODE" = "tagpath" ]; then + dialog --title "PROVIDE A CUSTOM PATH TO YOUR TAGFILES" --inputbox \ + "If you're installing from CD or DVD, it's impossible to edit the \ +tagfiles that are in the package directories. In this case, you might \ +want to provide a path to your custom tagfiles. As an example, you \ +could create a /tagfiles directory and mount a floppy disk containing \ +the tagfiles on that directory. Then you'd enter '/tagfiles' at the \ +prompt below. The setup program will look for your tagfile in \ +SUBDIRECTORIES of the path you provide, such as /tagfiles/a, \ +/tagfiles/ap, /tagfiles/d, and so on. You only need to provide a \ +subdirectory and tagfile for the first disk of each series to be \ +installed. If a custom tagfile is not found at the path you provide, \ +setup will revert to the default tagfiles. Please enter the path to your \ +custom tagfiles:" \ + 19 71 2> $TMP/SeTtagpath + if [ ! $? = 0 ]; then + continue + fi + if [ -r $TMP/SeTtagpath ]; then + if [ "`cat $TMP/SeTtagpath`" = "" ]; then + rm -f $TMP/SeTtagpath + elif [ ! -d "$(cat $TMP/SeTtagpath)" ]; then + dialog --title "NOT A VALID DIRECTORY" --msgbox \ +"Sorry, but the $(cat $TMP/SeTtagpath) directory could not be located. \ +Press ENTER to go back to the SELECT PROMPTING MODE menu." \ +7 65 + rm -f $TMP/SeTtagpath + continue + fi + fi + break; + fi + if [ "$MODE" = "newbie" ]; then + dialog --infobox "'newbie' prompt mode selected. Using default tagfiles \ +and verbose package prompting." 4 50 + break; + fi + if [ "$MODE" = "custom" ]; then + dialog --title "ENTER CUSTOM EXTENSION" --inputbox "Now, enter the custom \ +extension you have used for your tagfiles. This must be a valid MS-DOS format \ +file extension consisting of a period followed by three characters. For \ +example, I use '.pat'. You might see my tagfiles on your disks. :^)" \ +12 60 2> $TMP/SeTtagext + if [ ! $? = 0 ]; then + continue + fi + if [ -r $TMP/SeTtagext ]; then + if [ "`cat $TMP/SeTtagext`" = "" ]; then + rm -f $TMP/SeTtagext + fi + fi + dialog --infobox "'custom' prompt mode selected. Using prompting defaults \ +found in custom tagfiles." 4 50 + break; + fi + if [ "$MODE" = "full" ]; then + IGNORE_TAGFILES="-ignore_tagfiles" + dialog --infobox "Full installation mode. Installing all software \ +packages without prompting." 4 45 + break; + fi + if [ "$MODE" = "terse" ]; then + setterm -background cyan -foreground black -blank 0 + clear + IGNORE_TAGFILES="-ignore_tagfiles" + echo + echo + echo "Full (terse display) installation mode." + echo + echo "A one-line description will be displayed as each package is installed." + echo + break; + fi + if [ "$MODE" = "menu" ]; then + dialog --infobox "'menu' prompt mode selected. Using interactive menus \ +to choose subsystems of related packages." 4 60 + break; + fi + if [ "$MODE" = "expert" ]; then + dialog --infobox "'expert' prompt mode selected. Using interactive menus \ +to choose packages individually." 4 60 + break; + fi + done + export MAKETAG; + sleep 1 + if [ -r $TMP/SeTCDdev ]; then # only try to remount media if it's a CD/DVD + slackinstall --device `cat $TMP/SeTCDdev` --promptmode $MODE --srcpath `cat $TMP/SeTDS` --mountpoint /var/log/mount --target $T_PX --series $SERIES + elif [ -r $TMP/SeTremotesvr ]; then + slackinstall --device noremount --promptmode $MODE --srcpath `cat $TMP/SeTDS` --mountpoint /var/log/mount --target $T_PX --series $SERIES --net `cat $TMP/SeTremotesvr` + else + slackinstall --device noremount --promptmode $MODE --srcpath `cat $TMP/SeTDS` --mountpoint /var/log/mount --target $T_PX --series $SERIES + fi + if [ $MODE = terse ]; then + # Let's pause a moment and then restore the terminal settings + sleep 1 + setterm -background black -foreground white -blank 0 + fi + MAINSELECT="CONFIGURE" + fi + + if [ "$MAINSELECT" = "CONFIGURE" ]; then + SeTconfig + REPLACE_FSTAB=Y + if [ -r $TMP/SeTnative ]; then + if [ -r $T_PX/etc/fstab ]; then + dialog --title "REPLACE /etc/fstab?" --yesno "You already have an \ +/etc/fstab on your install partition. If you were just adding software, \ +you should probably keep your old /etc/fstab. If you've changed your \ +partitioning scheme, you should use the new /etc/fstab. Do you want \ +to replace your old /etc/fstab with the new one?" 10 58 + if [ ! $? = 0 ]; then + REPLACE_FSTAB=N + fi + fi + if [ "$REPLACE_FSTAB" = "Y" ]; then + cat /dev/null > $T_PX/etc/fstab + if [ -r $TMP/SeTswap ]; then + cat $TMP/SeTswap > $T_PX/etc/fstab + fi + cat $TMP/SeTnative >> $T_PX/etc/fstab + if [ -r $TMP/SeTDOS ]; then + cat $TMP/SeTDOS >> $T_PX/etc/fstab + fi + printf "%-16s %-16s %-11s %-16s %-3s %s\n" "#/dev/cdrom" "/mnt/cdrom" "auto" "noauto,owner,ro,comment=x-gvfs-show" "0" "0" >> $T_PX/etc/fstab + printf "%-16s %-16s %-11s %-16s %-3s %s\n" "/dev/fd0" "/mnt/floppy" "auto" "noauto,owner" "0" "0" >> $T_PX/etc/fstab + printf "%-16s %-16s %-11s %-16s %-3s %s\n" "devpts" "/dev/pts" "devpts" "gid=5,mode=620" "0" "0" >> $T_PX/etc/fstab + printf "%-16s %-16s %-11s %-16s %-3s %s\n" "proc" "/proc" "proc" "defaults" "0" "0" >> $T_PX/etc/fstab + printf "%-16s %-16s %-11s %-16s %-3s %s\n" "tmpfs" "/dev/shm" "tmpfs" "nosuid,nodev,noexec" "0" "0" >> $T_PX/etc/fstab + fi + dialog --title "SETUP COMPLETE" --msgbox "System configuration \ +and installation is complete. \ +\n\nYou may now reboot your system." 7 55 + fi + fi + + if [ "$MAINSELECT" = "EXIT" ]; then + break + fi + +done # end of main loop +sync + +chmod 755 $T_PX +if [ -d $T_PX/tmp ]; then + chmod 1777 $T_PX/tmp +fi +if mount | grep /var/log/mntiso 1> /dev/null 2> /dev/null ; then + umount -f /var/log/mntiso +fi +if mount | grep /var/log/mount 1> /dev/null 2> /dev/null ; then + umount /var/log/mount +fi +# Anything mounted on /var/log/mount now is a fatal error: +if mount | grep /var/log/mount 1> /dev/null 2> /dev/null ; then + exit +fi +# If the mount table is corrupt, the above might not do it, so we will +# try to detect Linux and FAT32 partitions that have slipped by: +if [ -d /var/log/mount/lost+found -o -d /var/log/mount/recycled \ + -o -r /var/log/mount/io.sys ]; then + exit +fi +rm -f /var/log/mount 2> /dev/null +rmdir /var/log/mount 2> /dev/null +mkdir /var/log/mount 2> /dev/null +chmod 755 /var/log/mount + +# An fstab file is indicative of an OS installation, rather than +# just loading the "setup" script and selecting "EXIT" +if [ -f ${T_PX}/etc/fstab ]; then + # umount CD: + if [ -r $TMP/SeTCDdev ]; then + if mount | grep iso9660 > /dev/null 2> /dev/null ; then + umount `mount | grep iso9660 | cut -f 1 -d ' '` + fi + eject -s `cat $TMP/SeTCDdev` + # Tell the user to remove the disc, if one had previously been mounted + # (it should now be ejected): + dialog \ + --clear \ + --title "Slackware Linux Setup is complete" "$@" \ + --msgbox "\nPlease remove the installation disc.\n" 7 40 + fi + # Offer to reboot or drop to shell: + dialog \ + --title "Slackware Linux Setup is complete" "$@" \ + --yesno \ + "\nWould you like to reboot your system?\n\n\n\ +If you choose \"No\", you will be dropped to a shell.\n" 11 50 + retval=$? + if [ $retval = 1 ]; then + clear + echo + echo "You may now reboot your system once you are ready." + echo "You can issue the 'reboot' command; or if your system has" + echo "a keyboard attached, you can use the key combination: control+alt+delete" + echo + else + touch /reboot + fi +fi + +# Fix the date: +/sbin/fixdate + +# final cleanup +rm -f $TMP/tagfile $TMP/SeT* $TMP/tar-error $TMP/PKGTOOL_REMOVED +rm -f /var/log/mount/treecache +rmdir /var/log/mntiso 2>/dev/null +rm -rf $TMP/treecache +rm -rf $TMP/pkgcache +rmdir ${T_PX}/tmp/orbit-root 2> /dev/null + +# If the OS had been installed and the user elected to reboot: +if [ -f /reboot ]; then + clear + echo "** Starting reboot **" + sleep 1 + reboot +fi + +# end slackware setup script diff --git a/source/installer/sources/initrd/usr/lib/setup/slackinstall b/source/installer/sources/initrd/usr/lib/setup/slackinstall new file mode 100755 index 000000000..1d16abdea --- /dev/null +++ b/source/installer/sources/initrd/usr/lib/setup/slackinstall @@ -0,0 +1,254 @@ +#!/bin/sh +# Copyright 2003 Slackware Linux, Inc., Concord, CA USA +# Copyright 2009 Patrick J. Volkerding, Sebeka, MN, USA +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# + +# globals + +TMP=/var/log/setup/tmp + +# functions + +get_pkg () { + # Download a package from a remote server. + # $1 == package series + # $2 == package base name + # $3 == additional options to the downloader (like, '-v') + # REMOTESVR points to the root of the slackware tree, and is composed of + # comma-separated values (protocol://remote_ipaddr[:portnumber],remote_root) + # like this example: 'ftp://192.168.0.22,/pub/slackware-12.1' + local REMOTE_URL=$(echo $REMOTESVR | cut -d, -f1) + local REMOTE_ROOT=$(echo $REMOTESVR | cut -d, -f2) + PKGBASE=$(basename $(basename $(basename $(basename $2 .tgz) .tbz) .tlz) .txz) + local PKGSIZE=`cat \`cat $TMP/SeTDS\`/${1}/${PKGBASE}.size` + # So Pat does not get a seizure ;-) + #dialog --title "FTP/HTTP DOWNLOAD ==> series '$1' <==" --infobox \ + # "Downloading ${2} ($PKGSIZE) ..." 3 72 + mkdir -p `cat $TMP/SeTDS`/${1} + cat /dev/null > `cat $TMP/SeTDS`/${1}/${2} + cat /dev/null > `cat $TMP/SeTDS`/${1}/${PKGBASE}.txt + wget $3 -c -P `cat $TMP/SeTDS`/${1} \ + $REMOTE_URL$REMOTE_ROOT/slackware/${1}/${PKGBASE}.txt + wget $3 -c -P `cat $TMP/SeTDS`/${1} \ + $REMOTE_URL$REMOTE_ROOT/slackware/${1}/${2} + if [ $? -ne 0 ]; then # One retry for aborted transfers + wget $3 -c -P `cat $TMP/SeTDS`/${1} \ + $REMOTE_URL$REMOTE_ROOT/slackware/${1}/${2} + fi + if [ $? -ne 0 ]; then + dialog --title "FTP/HTTP DOWNLOAD FAILURE" --msgbox \ + "Downloading ${2} FAILED." 5 72 + fi +} + +zap_pkg () { + # Cleanup a download from a remote server. + # $1 == package series + # $2 == package name + PKGBASE=$(basename $(basename $(basename $(basename $2 .tgz) .tbz) .tlz) .txz) + cat /dev/null > `cat $TMP/SeTDS`/${1}/${2} # zero the local file + rm -f `cat $TMP/SeTDS`/${1}/${PKGBASE}.txt # remove the description file +} + +updatetagfiles() { + if [ $MODE = newbie -o $MODE = full -o $MODE = terse ]; then + cat $TMP/series/series.in | while read series ; do + if [ -r $SRCPATH/$series/tagfile ]; then + mkdir -p $TMP/tagfiles/$series + cp -a $SRCPATH/$1/tagfile $TMP/tagfiles/$series + fi + done + elif [ $MODE = tagpath ]; then + cp -a `cat $TMP/SeTtagpath`/* $TMP/tagfiles + elif [ $MODE = custom ]; then + mkdir -p $TMP/tagfiles/$series + cp -a $SRCPATH/$series/tagfile`cat $TMP/SeTtagext` $TMP/tagfiles/$series/tagfile + elif [ $MODE = menu -o $MODE = expert ]; then + cat $TMP/series/series.in | while read series ; do + if [ $MODE = menu ]; then + if [ -r $SRCPATH/$series/maketag.ez ]; then + sh $SRCPATH/$series/maketag.ez + fi + else + if [ -r $SRCPATH/$series/maketag ]; then + sh $SRCPATH/$series/maketag + fi + fi + if [ -r $TMP/SeTnewtag ]; then + mkdir -p $TMP/tagfiles/$series + mv $TMP/SeTnewtag $TMP/tagfiles/$series/tagfile + fi + done + fi +} + +errorcode() { + if [ $1 = 99 ]; then + # User aborted installation + exit 1 + else + dialog --timeout 600 --title "installpkg error #$1" --msgbox \ +"There was a fatal error attempting to install $2. The package may \ +be corrupt, the installation media may be bad, one of the target \ +drives may be full, or something else \ +has caused the package to be unable to be read without error. You \ +may hit enter to continue if you wish, but if this is an important \ +required package then your installation may not work as-is." 11 70 + fi +} + +installseries() { + if [ -d $SRCPATH/$1 ]; then + # First, make sure our tagfiles are in order: + if [ ! -r $TMP/tagfiles/$1/tagfile -a ! $MODE = full -a ! $MODE = terse ]; then + updatetagfiles $1 + fi + # First, make sure there's at least one package: + if ! ls $SRCPATH/$series/*.t?z 1> /dev/null 2> /dev/null ; then + return 1 + fi + if [ "$MODE" = "terse" ]; then + echo " >> Installing package series $(echo $1 | tr [a-z] [A-Z])" + else + dialog --infobox " +Installing package series ==>$1<== +" 5 45 + fi + sleep 1 + # Install the package series: + for package in $SRCPATH/$series/*.t?z ; do + if [ "$MODE" = "full" ]; then # install the package + [ "x$REMOTESVR" != "x" ] && get_pkg $series $(basename $package) '-q' + installpkg -root $ROOTDIR -infobox -priority ADD $package + ERROR=$? + elif [ "$MODE" = "terse" ]; then # install the package with terse description + [ "x$REMOTESVR" != "x" ] && get_pkg $series $(basename $package) '-q' + installpkg -root $ROOTDIR -terse -priority ADD $package + ERROR=$? + else + if [ "x$REMOTESVR" != "x" ]; then + grep "^$(echo $(basename $package) | rev | cut -f4- -d '-' | rev):" \ + $TMP/tagfiles/$1/tagfile | grep -qw SKP \ + || get_pkg $series $(basename $package) '-q' + fi + installpkg -root $ROOTDIR -menu -tagfile $TMP/tagfiles/$1/tagfile $package + ERROR=$? + fi + if [ ! $ERROR = 0 ]; then + errorcode $ERROR $package + fi + [ "x$REMOTESVR" != "x" ] && zap_pkg $series $(basename $package) + done + # A "README_SPLIT.TXT" file means the series continues on another CD: + if [ -r $SRCPATH/$series/README_SPLIT.TXT -o -r $SRCPATH/$series/readme_split.txt ] ; then + # Defer until later. + echo $1 >> $TMP/series/series.out + fi + else # requested, but not on media. defer until later. + echo $1 >> $TMP/series/series.out + fi +} + +remount_disc() { + umount $DEVICE 2> /dev/null + eject -s $DEVICE 2> /dev/null + dialog --title "INSERT NEXT DISC" --menu "Please insert the next Slackware disc and \ +press ENTER to continue installing packages." \ +10 62 2 \ + "Continue" "Install packages from the next disc" \ + "Quit" "Quit installing packages and finish up" 2> $TMP/reply + if [ ! $? = 0 ]; then + REPLY="Quit" + else + REPLY="`cat $TMP/reply`" + fi + rm -f $TMP/reply + if [ "$REPLY" = "Quit" ]; then + errorcode 99 + fi; + # Recently, mounting has become unreliable at this point. + # Not sure if it's udev, or what, but we have seen + # mount: /dev/sr0: unknown device + # We will attempt to mount several times to attempt to make + # this less likely to fail. + for attempt in 1 2 3 4 5 6 7 8 9 10 11 ; do + mount $DEVICE $MOUNTPOINT 2> /dev/null + if [ $? = 0 ]; then + break + fi + sleep 7 + done + if [ "$MODE" = "terse" ]; then + setterm -background cyan -foreground black -blank 0 + fi +} + +# /* main */ + +# Process command line: +if [ $# -gt 0 ]; then # there are arguments to the command + while [ $# -gt 0 ]; do + case "$1" in + "--promptmode") + MODE=`echo $2` ; shift 2 ;; + "--srcpath") + SRCPATH=`echo $2` ; shift 2 ;; + "--mountpoint") + MOUNTPOINT=`echo $2` ; shift 2 ;; + "--target") + ROOTDIR=`echo $2` ; shift 2 ;; + "--device") + DEVICE=`echo $2` ; shift 2 ;; + "--series") + SERIES=`echo $2` ; shift 2 ;; + "--net") + REMOTESVR=`echo $2` ; shift 2 ;; + *) + echo "Unrecognized option $1" ; shift 1 ;; + esac + done +else + exit 1; +fi +# Empty out temporary directories: +rm -rf $TMP/series $TMP/tagfiles +mkdir -p $TMP/series $TMP/tagfiles +# Create initial list of series to install: +for series in `echo $SERIES | tr "#" " "` ; do + echo $series | tr A-Z a-z >> $TMP/series/series.in +done +# Main loop: +while [ -r $TMP/series/series.in ]; do + cat $TMP/series/series.in | while read series ; do + installseries $series; + done + rm -f $TMP/series/series.in + if [ -r $TMP/series/series.out ]; then + mv $TMP/series/series.out $TMP/series/series.in + if [ "$DEVICE" = "noremount" ]; then + # we've done all we can here + break + else # see if there's anything we need on the next disc + remount_disc + fi + fi +done + diff --git a/source/installer/sources/initrd/usr/lib/setup/unmigrate.sh b/source/installer/sources/initrd/usr/lib/setup/unmigrate.sh new file mode 100755 index 000000000..fa374bcd6 --- /dev/null +++ b/source/installer/sources/initrd/usr/lib/setup/unmigrate.sh @@ -0,0 +1,13 @@ +#!/bin/sh +# +# This resets the temporary directory to /tmp on the floppy in the +# case where it's been changed during a previous 'setup' run. This +# should be done before $TMP is cleared. +# + +TMPLINK="`LC_ALL=C /bin/ls -l /var/log/setup/tmp | tr -s ' ' | cut -f 11 -d ' '`" +if [ -L /var/log/setup/tmp -a ! "$TMPLINK" = "/tmp" ]; then + ( cd /var/log/setup + rm tmp + ln -sf /tmp tmp ) +fi diff --git a/source/installer/sources/initrd/usr/lib/terminfo b/source/installer/sources/initrd/usr/lib/terminfo new file mode 120000 index 000000000..32e6eb76c --- /dev/null +++ b/source/installer/sources/initrd/usr/lib/terminfo @@ -0,0 +1 @@ +../share/terminfo
\ No newline at end of file diff --git a/source/installer/sources/initrd/usr/man/cat1 b/source/installer/sources/initrd/usr/man/cat1 new file mode 120000 index 000000000..f9f965ccf --- /dev/null +++ b/source/installer/sources/initrd/usr/man/cat1 @@ -0,0 +1 @@ +man1
\ No newline at end of file diff --git a/source/installer/sources/initrd/usr/man/cat3 b/source/installer/sources/initrd/usr/man/cat3 new file mode 120000 index 000000000..66d2fdabb --- /dev/null +++ b/source/installer/sources/initrd/usr/man/cat3 @@ -0,0 +1 @@ +man3
\ No newline at end of file diff --git a/source/installer/sources/initrd/usr/man/cat5 b/source/installer/sources/initrd/usr/man/cat5 new file mode 120000 index 000000000..619c11e24 --- /dev/null +++ b/source/installer/sources/initrd/usr/man/cat5 @@ -0,0 +1 @@ +man5
\ No newline at end of file diff --git a/source/installer/sources/initrd/usr/man/cat8 b/source/installer/sources/initrd/usr/man/cat8 new file mode 120000 index 000000000..80f21f85e --- /dev/null +++ b/source/installer/sources/initrd/usr/man/cat8 @@ -0,0 +1 @@ +man8
\ No newline at end of file diff --git a/source/installer/sources/initrd/var/adm b/source/installer/sources/initrd/var/adm new file mode 120000 index 000000000..fbf828d63 --- /dev/null +++ b/source/installer/sources/initrd/var/adm @@ -0,0 +1 @@ +log
\ No newline at end of file diff --git a/source/installer/sources/initrd/var/lib/tftpboot/pxelinux.0 b/source/installer/sources/initrd/var/lib/tftpboot/pxelinux.0 Binary files differnew file mode 100644 index 000000000..c82f91a8a --- /dev/null +++ b/source/installer/sources/initrd/var/lib/tftpboot/pxelinux.0 diff --git a/source/installer/sources/initrd/var/lib/tftpboot/pxelinux.cfg/default b/source/installer/sources/initrd/var/lib/tftpboot/pxelinux.cfg/default new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/source/installer/sources/initrd/var/lib/tftpboot/pxelinux.cfg/default diff --git a/source/installer/sources/initrd/var/lib/tftpboot/slackpxe.cfg b/source/installer/sources/initrd/var/lib/tftpboot/slackpxe.cfg new file mode 100644 index 000000000..47e285b56 --- /dev/null +++ b/source/installer/sources/initrd/var/lib/tftpboot/slackpxe.cfg @@ -0,0 +1,3 @@ +REMOTE_URL=@REMOTE_URL@ +REMOTE_PATH=@REMOTE_PATH@ + diff --git a/source/installer/sources/initrd/var/log/packages b/source/installer/sources/initrd/var/log/packages new file mode 120000 index 000000000..89c9c896c --- /dev/null +++ b/source/installer/sources/initrd/var/log/packages @@ -0,0 +1 @@ +/mnt/var/log/packages
\ No newline at end of file diff --git a/source/installer/sources/initrd/var/log/scripts b/source/installer/sources/initrd/var/log/scripts new file mode 120000 index 000000000..5fc539add --- /dev/null +++ b/source/installer/sources/initrd/var/log/scripts @@ -0,0 +1 @@ +/mnt/var/log/scripts
\ No newline at end of file diff --git a/source/installer/sources/initrd/var/log/setup/tmp b/source/installer/sources/initrd/var/log/setup/tmp new file mode 120000 index 000000000..cad230910 --- /dev/null +++ b/source/installer/sources/initrd/var/log/setup/tmp @@ -0,0 +1 @@ +/tmp
\ No newline at end of file diff --git a/source/installer/sources/initrd/var/log/wtmp b/source/installer/sources/initrd/var/log/wtmp new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/source/installer/sources/initrd/var/log/wtmp diff --git a/source/k/kernel-configs/config-generic-4.14.47 b/source/k/kernel-configs/config-generic-4.14.48 index b8c6a0654..45c088c78 100644 --- a/source/k/kernel-configs/config-generic-4.14.47 +++ b/source/k/kernel-configs/config-generic-4.14.48 @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/x86 4.14.47 Kernel Configuration +# Linux/x86 4.14.48 Kernel Configuration # # CONFIG_64BIT is not set CONFIG_X86_32=y diff --git a/source/k/kernel-configs/config-generic-4.14.47.x64 b/source/k/kernel-configs/config-generic-4.14.48.x64 index 32303cf48..1a428e08c 100644 --- a/source/k/kernel-configs/config-generic-4.14.47.x64 +++ b/source/k/kernel-configs/config-generic-4.14.48.x64 @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/x86 4.14.47 Kernel Configuration +# Linux/x86 4.14.48 Kernel Configuration # CONFIG_64BIT=y CONFIG_X86_64=y diff --git a/source/k/kernel-configs/config-generic-smp-4.14.47-smp b/source/k/kernel-configs/config-generic-smp-4.14.48-smp index 98da18df3..c43bb45f9 100644 --- a/source/k/kernel-configs/config-generic-smp-4.14.47-smp +++ b/source/k/kernel-configs/config-generic-smp-4.14.48-smp @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/x86 4.14.47 Kernel Configuration +# Linux/x86 4.14.48 Kernel Configuration # # CONFIG_64BIT is not set CONFIG_X86_32=y diff --git a/source/k/kernel-configs/config-huge-4.14.47 b/source/k/kernel-configs/config-huge-4.14.48 index a601d662f..e3f204e43 100644 --- a/source/k/kernel-configs/config-huge-4.14.47 +++ b/source/k/kernel-configs/config-huge-4.14.48 @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/x86 4.14.47 Kernel Configuration +# Linux/x86 4.14.48 Kernel Configuration # # CONFIG_64BIT is not set CONFIG_X86_32=y diff --git a/source/k/kernel-configs/config-huge-4.14.47.x64 b/source/k/kernel-configs/config-huge-4.14.48.x64 index 623d8b0e4..c52455168 100644 --- a/source/k/kernel-configs/config-huge-4.14.47.x64 +++ b/source/k/kernel-configs/config-huge-4.14.48.x64 @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/x86 4.14.47 Kernel Configuration +# Linux/x86 4.14.48 Kernel Configuration # CONFIG_64BIT=y CONFIG_X86_64=y diff --git a/source/k/kernel-configs/config-huge-smp-4.14.47-smp b/source/k/kernel-configs/config-huge-smp-4.14.48-smp index e57953942..7a1f3c142 100644 --- a/source/k/kernel-configs/config-huge-smp-4.14.47-smp +++ b/source/k/kernel-configs/config-huge-smp-4.14.48-smp @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/x86 4.14.47 Kernel Configuration +# Linux/x86 4.14.48 Kernel Configuration # # CONFIG_64BIT is not set CONFIG_X86_32=y diff --git a/source/k/linux-4.14.47.tar.sign b/source/k/linux-4.14.47.tar.sign deleted file mode 100644 index 831aa2aa5..000000000 --- a/source/k/linux-4.14.47.tar.sign +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAlsPCm0ACgkQONu9yGCS -aT6kSg//bFgSINKTh70Lfc1W/BsvVWHu0iW722ZkkKMozxLvOgUykAVLVtdg9y6P -d5Nm1foFCoDezVc+iNqRyyZRyQGsLBR6SG3QA6nFgFxrlmA2MXokrx+ymNcK69MA -unXnjpd5gguq9SNdKSlvmVLyKvOVCZlcZ+nc00wyw5oSTV584Zqe1pHysL1LLcBR -08n4gdLfOptID8IajcgFYvujx7MvjuQYWfOxzu6VgiqoLd4VzW3xRFKjmoS5Ltua -bJWCrr4N3AMcJCy10/2NWz+90zYAoZEJlTxgIEegV9+hE4GAuaguXTCKTMXAzNvA -D/JerlfPU27YZbgNfndYuQdRONokxzjGIb1ktcCpDw8Gkzk3crhLot1aYpLbdQ92 -SrPOXJAxezVSyDHmyOLGvVBXR9/7Mz0XNoip3m8nViy/McD11hGYkiFFVFryVqs7 -uPTCnCk77ShbusljLUBA9hQvaTSCHJ92a/3xvLee0sO57pFFPYNrGTvO9tQjyiP3 -FptKo5c2Yu/oLDAXlMlEaNUH2Ii+IPwe9PdaFtEwrQkyGNSul8UgFyVZNwniFFRz -P/LEp2E9oB+ajEmpVbGjJWOlv1h65nBzH4CyWbkCo38oeEAPU/YPHEpSWiVESWQT -cx9ZiP9rz0quivjZn41DMIG0bs4jVrXW1TjDDyr5wHsyrMMy6Vo= -=NyZS ------END PGP SIGNATURE----- diff --git a/source/k/linux-4.14.48.tar.sign b/source/k/linux-4.14.48.tar.sign new file mode 100644 index 000000000..ba26a3c06 --- /dev/null +++ b/source/k/linux-4.14.48.tar.sign @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAlsWWvUACgkQONu9yGCS +aT5ScxAAx6/sNGGqEa26vo/DoKZL5gnsrU3FA9mnUId5eZMA8x2z05h91I8G6BgZ +vgCIJqXG9aJAgdYPNZHMQpJqKoQezR22u725OezDaxL55qNrbM7V9HMPUGOf5nJV +Jw5toqvCHo5XynuggvbglHNNj8ZQ79rJXo1vChzwpUzCjdx8SDkq3w530XUV8WKW +I6N4349N6CzT9Q4di1eUovbWpdHva85AfIrxUdw5usZ7x1X0RprBLKSHjV/O7s5R +TsZv61Ka2YqbgElADBWVXLDZ0rnhX73lL53E3oP4k4mfgPzqOUbpxmaYbMJaKsta +Qp8IJSYhT0pwv4wCToJnij/0Zq8/negXOTS6lynDk4vLuXJtIedAaBBw4SGPEI3a +NlKNjbLkArh4JxO0qkPRIgxk+nf1FZ5x/aYQ++RjshqPcWvKF4i/sjaOs31smscn +ju5T4GmsoLfFdb1zddWm99V07ucCrMlHzu2m380Xydawt0Gs6GBpLHkDyL+hrrnZ +JKtUIH6hhoMGi1AJwymeZ9sGZ2pdZqagJzTJbi8zELyuEoQ9w05McqacgQYW3zzF +jU2pRnoly4kb7X+15/4MyClnLqVsQKKSdzhXMINEANojYNknByHWMfKr+bHkdAkN +1muWSGJBefSPBQg66DJOKgsZAhNTGPAzs0Epb9UaUeTyj/qFFkE= +=2kuG +-----END PGP SIGNATURE----- diff --git a/source/l/elfutils/elfutils.SlackBuild b/source/l/elfutils/elfutils.SlackBuild index 82d3e8e5c..367b70120 100755 --- a/source/l/elfutils/elfutils.SlackBuild +++ b/source/l/elfutils/elfutils.SlackBuild @@ -24,7 +24,7 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=elfutils VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} -BUILD=${BUILD:-2} +BUILD=${BUILD:-1} # Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then diff --git a/source/l/harfbuzz/harfbuzz.SlackBuild b/source/l/harfbuzz/harfbuzz.SlackBuild index 08d979cae..85a0b6195 100755 --- a/source/l/harfbuzz/harfbuzz.SlackBuild +++ b/source/l/harfbuzz/harfbuzz.SlackBuild @@ -24,7 +24,7 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=harfbuzz VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} -BUILD=${BUILD:-3} +BUILD=${BUILD:-1} # Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then diff --git a/source/l/mozilla-nss/mozilla-nss.SlackBuild b/source/l/mozilla-nss/mozilla-nss.SlackBuild index 0d0f788e5..0bc7a3662 100755 --- a/source/l/mozilla-nss/mozilla-nss.SlackBuild +++ b/source/l/mozilla-nss/mozilla-nss.SlackBuild @@ -26,7 +26,7 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=mozilla-nss SRCNAM=nss -VERSION=${VERSION:-3.37.1} +VERSION=${VERSION:-3.37.3} NSPR=${NSPR:-4.19} BUILD=${BUILD:-1} diff --git a/source/l/readline/readline-7.0-patches/readline70-004 b/source/l/readline/readline-7.0-patches/readline70-004 new file mode 100644 index 000000000..e2f680608 --- /dev/null +++ b/source/l/readline/readline-7.0-patches/readline70-004 @@ -0,0 +1,47 @@ + READLINE PATCH REPORT + ===================== + +Readline-Release: 7.0 +Patch-ID: readline70-004 + +Bug-Reported-by: Kieran Grant <kieran.thehacker.grant@gmail.com> +Bug-Reference-ID: <ec9071ae-efb1-9e09-5d03-e905daf2835c@gmail.com> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2018-02/msg00002.html + +Bug-Description: + +With certain values for PS1, especially those that wrap onto three or more +lines, readline will miscalculate the number of invisible characters, +leading to crashes and core dumps. + +Patch (apply with `patch -p0'): + +*** ../readline-7.0.3/display.c 2016-07-28 14:49:33.000000000 -0400 +--- display.c 2018-02-03 19:19:35.000000000 -0500 +*************** +*** 772,776 **** + wadjust = (newlines == 0) + ? prompt_invis_chars_first_line +! : ((newlines == prompt_lines_estimate) ? wrap_offset : prompt_invis_chars_first_line); + + /* fix from Darin Johnson <darin@acuson.com> for prompt string with +--- 788,794 ---- + wadjust = (newlines == 0) + ? prompt_invis_chars_first_line +! : ((newlines == prompt_lines_estimate) +! ? (wrap_offset - prompt_invis_chars_first_line) +! : 0); + + /* fix from Darin Johnson <darin@acuson.com> for prompt string with +*** ../readline-7.0/patchlevel 2013-11-15 08:11:11.000000000 -0500 +--- patchlevel 2014-03-21 08:28:40.000000000 -0400 +*************** +*** 1,3 **** + # Do not edit -- exists only for use by patch + +! 3 +--- 1,3 ---- + # Do not edit -- exists only for use by patch + +! 4 + diff --git a/source/l/readline/readline-7.0-patches/readline70-005 b/source/l/readline/readline-7.0-patches/readline70-005 new file mode 100644 index 000000000..99753224c --- /dev/null +++ b/source/l/readline/readline-7.0-patches/readline70-005 @@ -0,0 +1,58 @@ + READLINE PATCH REPORT + ===================== + +Readline-Release: 7.0 +Patch-ID: readline70-005 + +Bug-Reported-by: Nuzhna Pomoshch <nuzhna_pomoshch@yahoo.com> +Bug-Reference-ID: <1317167476.1492079.1495999776464@mail.yahoo.com> +Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-readline/2017-05/msg00005.html + +Bug-Description: + +There are cases where a failing readline command (e.g., delete-char at the end +of a line) can cause a multi-character key sequence to `back up' and attempt +to re-read some of the characters in the sequence. + +Patch (apply with `patch -p0'): + +*** ../readline-7.0/readline.c 2016-04-20 15:53:52.000000000 -0400 +--- readline.c 2018-05-26 17:19:00.000000000 -0400 +*************** +*** 1058,1062 **** + r = _rl_dispatch (ANYOTHERKEY, m); + } +! else if (r && map[ANYOTHERKEY].function) + { + /* We didn't match (r is probably -1), so return something to +--- 1056,1060 ---- + r = _rl_dispatch (ANYOTHERKEY, m); + } +! else if (r < 0 && map[ANYOTHERKEY].function) + { + /* We didn't match (r is probably -1), so return something to +*************** +*** 1070,1074 **** + return -2; + } +! else if (r && got_subseq) + { + /* OK, back up the chain. */ +--- 1068,1072 ---- + return -2; + } +! else if (r < 0 && got_subseq) /* XXX */ + { + /* OK, back up the chain. */ +*** ../readline-7.0/patchlevel 2013-11-15 08:11:11.000000000 -0500 +--- patchlevel 2014-03-21 08:28:40.000000000 -0400 +*************** +*** 1,3 **** + # Do not edit -- exists only for use by patch + +! 4 +--- 1,3 ---- + # Do not edit -- exists only for use by patch + +! 5 + diff --git a/source/l/readline/readline.SlackBuild b/source/l/readline/readline.SlackBuild index 10f83fdb8..776482ab2 100755 --- a/source/l/readline/readline.SlackBuild +++ b/source/l/readline/readline.SlackBuild @@ -24,7 +24,7 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=readline VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} -BUILD=${BUILD:-2} +BUILD=${BUILD:-1} # Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then diff --git a/source/x/dejavu-fonts-ttf/dejavu-fonts-ttf.SlackBuild b/source/x/dejavu-fonts-ttf/dejavu-fonts-ttf.SlackBuild index 1255dce6e..7c5143cec 100755 --- a/source/x/dejavu-fonts-ttf/dejavu-fonts-ttf.SlackBuild +++ b/source/x/dejavu-fonts-ttf/dejavu-fonts-ttf.SlackBuild @@ -25,7 +25,7 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=dejavu-fonts-ttf VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} ARCH=noarch -BUILD=${BUILD:-3} +BUILD=${BUILD:-4} # If the variable PRINT_PACKAGE_NAME is set, then this script will report what # the name of the created package would be, and then exit. This information diff --git a/source/x/dejavu-fonts-ttf/doinst.sh b/source/x/dejavu-fonts-ttf/doinst.sh index bdb050188..2056d0734 100644 --- a/source/x/dejavu-fonts-ttf/doinst.sh +++ b/source/x/dejavu-fonts-ttf/doinst.sh @@ -1,11 +1,9 @@ #!/bin/sh # Update the X font indexes: if [ -x /usr/bin/mkfontdir -o -x /usr/X11R6/bin/mkfontdir ]; then - ( cd /usr/share/fonts/TTF - mkfontscale . - mkfontdir . - ) + mkfontscale usr/share/fonts/TTF 2> /dev/null + mkfontdir usr/share/fonts/TTF 2> /dev/null fi if [ -x /usr/bin/fc-cache ]; then - /usr/bin/fc-cache -f + /usr/bin/fc-cache -f 2> /dev/null fi diff --git a/source/x/liberation-fonts-ttf/doinst.sh b/source/x/liberation-fonts-ttf/doinst.sh index bdb050188..2056d0734 100644 --- a/source/x/liberation-fonts-ttf/doinst.sh +++ b/source/x/liberation-fonts-ttf/doinst.sh @@ -1,11 +1,9 @@ #!/bin/sh # Update the X font indexes: if [ -x /usr/bin/mkfontdir -o -x /usr/X11R6/bin/mkfontdir ]; then - ( cd /usr/share/fonts/TTF - mkfontscale . - mkfontdir . - ) + mkfontscale usr/share/fonts/TTF 2> /dev/null + mkfontdir usr/share/fonts/TTF 2> /dev/null fi if [ -x /usr/bin/fc-cache ]; then - /usr/bin/fc-cache -f + /usr/bin/fc-cache -f 2> /dev/null fi diff --git a/source/x/liberation-fonts-ttf/liberation-fonts-ttf.SlackBuild b/source/x/liberation-fonts-ttf/liberation-fonts-ttf.SlackBuild index 8f5f8ecd1..3dc1ec434 100755 --- a/source/x/liberation-fonts-ttf/liberation-fonts-ttf.SlackBuild +++ b/source/x/liberation-fonts-ttf/liberation-fonts-ttf.SlackBuild @@ -25,7 +25,7 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=liberation-fonts-ttf VERSION=2.00.1 ARCH=noarch -BUILD=${BUILD:-2} +BUILD=${BUILD:-3} # If the variable PRINT_PACKAGE_NAME is set, then this script will report what # the name of the created package would be, and then exit. This information diff --git a/source/x/sazanami-fonts-ttf/sazanami-fonts-ttf.SlackBuild b/source/x/sazanami-fonts-ttf/sazanami-fonts-ttf.SlackBuild index daa852568..0bfa0f50b 100755 --- a/source/x/sazanami-fonts-ttf/sazanami-fonts-ttf.SlackBuild +++ b/source/x/sazanami-fonts-ttf/sazanami-fonts-ttf.SlackBuild @@ -38,7 +38,7 @@ PKGNAM=sazanami-fonts-ttf REALNAM=sazanami VERSION=${VERSION:-20040629} ARCH=noarch -BUILD=${BUILD:-2} +BUILD=${BUILD:-3} # If the variable PRINT_PACKAGE_NAME is set, then this script will report what # the name of the created package would be, and then exit. This information @@ -87,11 +87,11 @@ cat << EOT > $PKG/install/doinst.sh # does the same thing, saving time. # Update X font indexes and the font cache: if [ -x /usr/bin/mkfontdir ]; then - /usr/bin/mkfontscale $FONTDIR - /usr/bin/mkfontdir $FONTDIR + /usr/bin/mkfontscale $FONTDIR 2> /dev/null + /usr/bin/mkfontdir $FONTDIR 2> /dev/null fi if [ -x /usr/bin/fc-cache ]; then - /usr/bin/fc-cache $FONTDIR + /usr/bin/fc-cache $FONTDIR 2> /dev/null fi EOT diff --git a/source/x/sinhala_lklug-font-ttf/sinhala_lklug-font-ttf.SlackBuild b/source/x/sinhala_lklug-font-ttf/sinhala_lklug-font-ttf.SlackBuild index 0fc464aa7..a8254f1ff 100755 --- a/source/x/sinhala_lklug-font-ttf/sinhala_lklug-font-ttf.SlackBuild +++ b/source/x/sinhala_lklug-font-ttf/sinhala_lklug-font-ttf.SlackBuild @@ -37,7 +37,7 @@ PKGNAM=sinhala_lklug-font-ttf FONTNAM=sinhala_lklug VERSION=${VERSION:-20060929} ARCH=noarch -BUILD=${BUILD:-2} +BUILD=${BUILD:-3} # If the variable PRINT_PACKAGE_NAME is set, then this script will report what # the name of the created package would be, and then exit. This information @@ -88,11 +88,11 @@ cat << EOT > $PKG/install/doinst.sh # does the same thing, saving time. # Update X font indexes and the font cache: if [ -x /usr/bin/mkfontdir ]; then - /usr/bin/mkfontscale $FONTDIR - /usr/bin/mkfontdir $FONTDIR + /usr/bin/mkfontscale $FONTDIR 2> /dev/null + /usr/bin/mkfontdir $FONTDIR 2> /dev/null fi if [ -x /usr/bin/fc-cache ]; then - /usr/bin/fc-cache $FONTDIR + /usr/bin/fc-cache $FONTDIR 2> /dev/null fi EOT diff --git a/source/x/tibmachuni-font-ttf/tibmachuni-font-ttf.SlackBuild b/source/x/tibmachuni-font-ttf/tibmachuni-font-ttf.SlackBuild index fa5e16cab..cd77350a3 100755 --- a/source/x/tibmachuni-font-ttf/tibmachuni-font-ttf.SlackBuild +++ b/source/x/tibmachuni-font-ttf/tibmachuni-font-ttf.SlackBuild @@ -36,7 +36,7 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=tibmachuni-font-ttf VERSION=${VERSION:-1.901b} ARCH=noarch -BUILD=${BUILD:-2} +BUILD=${BUILD:-3} # If the variable PRINT_PACKAGE_NAME is set, then this script will report what # the name of the created package would be, and then exit. This information @@ -100,11 +100,11 @@ cat << EOT > $PKG/install/doinst.sh # does the same thing, saving time. # Update X font indexes and the font cache: if [ -x /usr/bin/mkfontdir ]; then - /usr/bin/mkfontscale $FONTDIR - /usr/bin/mkfontdir $FONTDIR + /usr/bin/mkfontscale $FONTDIR 2> /dev/null + /usr/bin/mkfontdir $FONTDIR 2> /dev/null fi if [ -x /usr/bin/fc-cache ]; then - /usr/bin/fc-cache $FONTDIR + /usr/bin/fc-cache $FONTDIR 2> /dev/null fi EOT diff --git a/source/x/ttf-indic-fonts/doinst.sh b/source/x/ttf-indic-fonts/doinst.sh index 2566f24ff..e08ddadea 100644 --- a/source/x/ttf-indic-fonts/doinst.sh +++ b/source/x/ttf-indic-fonts/doinst.sh @@ -1,12 +1,10 @@ #!/bin/sh # Update mkfontscale and mkfontdir: if [ -x /usr/bin/mkfontdir ]; then - ( cd /usr/share/fonts/TTF - mkfontscale . - mkfontdir . - ) + mkfontscale usr/share/fonts/TTF 2> /dev/null + mkfontdir usr/share/fonts/TTF 2> /dev/null fi # Update the X font indexes: if [ -x /usr/bin/fc-cache ]; then - /usr/bin/fc-cache -f + /usr/bin/fc-cache -f 2> /dev/null fi diff --git a/source/x/ttf-indic-fonts/ttf-indic-fonts.SlackBuild b/source/x/ttf-indic-fonts/ttf-indic-fonts.SlackBuild index 249446df6..4fdc4408b 100755 --- a/source/x/ttf-indic-fonts/ttf-indic-fonts.SlackBuild +++ b/source/x/ttf-indic-fonts/ttf-indic-fonts.SlackBuild @@ -25,7 +25,7 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=ttf-indic-fonts VERSION=0.5.14 ARCH=noarch -BUILD=${BUILD:-2} +BUILD=${BUILD:-3} # If the variable PRINT_PACKAGE_NAME is set, then this script will report what # the name of the created package would be, and then exit. This information diff --git a/source/x/ttf-tlwg/doinst.sh b/source/x/ttf-tlwg/doinst.sh index bdb050188..2056d0734 100644 --- a/source/x/ttf-tlwg/doinst.sh +++ b/source/x/ttf-tlwg/doinst.sh @@ -1,11 +1,9 @@ #!/bin/sh # Update the X font indexes: if [ -x /usr/bin/mkfontdir -o -x /usr/X11R6/bin/mkfontdir ]; then - ( cd /usr/share/fonts/TTF - mkfontscale . - mkfontdir . - ) + mkfontscale usr/share/fonts/TTF 2> /dev/null + mkfontdir usr/share/fonts/TTF 2> /dev/null fi if [ -x /usr/bin/fc-cache ]; then - /usr/bin/fc-cache -f + /usr/bin/fc-cache -f 2> /dev/null fi diff --git a/source/x/ttf-tlwg/ttf-tlwg.SlackBuild b/source/x/ttf-tlwg/ttf-tlwg.SlackBuild index e9c064227..962145d0b 100755 --- a/source/x/ttf-tlwg/ttf-tlwg.SlackBuild +++ b/source/x/ttf-tlwg/ttf-tlwg.SlackBuild @@ -25,7 +25,7 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=ttf-tlwg VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} ARCH=noarch -BUILD=${BUILD:-2} +BUILD=${BUILD:-3} # If the variable PRINT_PACKAGE_NAME is set, then this script will report what # the name of the created package would be, and then exit. This information diff --git a/source/x/urw-core35-fonts-otf/doinst.sh b/source/x/urw-core35-fonts-otf/doinst.sh index 0c434b5ae..8ebd90a77 100644 --- a/source/x/urw-core35-fonts-otf/doinst.sh +++ b/source/x/urw-core35-fonts-otf/doinst.sh @@ -1,11 +1,9 @@ #!/bin/sh # Update the X font indexes: if [ -x /usr/bin/mkfontdir -o -x /usr/X11R6/bin/mkfontdir ]; then - ( cd /usr/share/fonts/OTF - mkfontscale . - mkfontdir . - ) + mkfontscale usr/share/fonts/OTF 2> /dev/null + mkfontdir usr/share/fonts/OTF 2> /dev/null fi if [ -x /usr/bin/fc-cache ]; then - /usr/bin/fc-cache -f + /usr/bin/fc-cache -f 2> /dev/null fi diff --git a/source/x/urw-core35-fonts-otf/urw-core35-fonts-otf.SlackBuild b/source/x/urw-core35-fonts-otf/urw-core35-fonts-otf.SlackBuild index fb19026fe..9a7f9e815 100755 --- a/source/x/urw-core35-fonts-otf/urw-core35-fonts-otf.SlackBuild +++ b/source/x/urw-core35-fonts-otf/urw-core35-fonts-otf.SlackBuild @@ -25,7 +25,7 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=urw-core35-fonts-otf VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} ARCH=noarch -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} # If the variable PRINT_PACKAGE_NAME is set, then this script will report what # the name of the created package would be, and then exit. This information diff --git a/source/x/wqy-zenhei-font-ttf/wqy-zenhei-font-ttf.SlackBuild b/source/x/wqy-zenhei-font-ttf/wqy-zenhei-font-ttf.SlackBuild index a61d6f0da..9f075e577 100755 --- a/source/x/wqy-zenhei-font-ttf/wqy-zenhei-font-ttf.SlackBuild +++ b/source/x/wqy-zenhei-font-ttf/wqy-zenhei-font-ttf.SlackBuild @@ -39,7 +39,7 @@ SRCNAM=wqy-zenhei VERSION=${VERSION:-0.8.38} SUB=${SUB:-1} ARCH=noarch -BUILD=${BUILD:-5} +BUILD=${BUILD:-6} # If the variable PRINT_PACKAGE_NAME is set, then this script will report what # the name of the created package would be, and then exit. This information @@ -118,11 +118,11 @@ cat << EOT > $PKG/install/doinst.sh # does the same thing, saving time. # Update X font indexes and the font cache: if [ -x /usr/bin/mkfontdir ]; then - /usr/bin/mkfontscale $FONTDIR - /usr/bin/mkfontdir $FONTDIR + /usr/bin/mkfontscale $FONTDIR 2> /dev/null + /usr/bin/mkfontdir $FONTDIR 2> /dev/null fi if [ -x /usr/bin/fc-cache ]; then - /usr/bin/fc-cache $FONTDIR + /usr/bin/fc-cache $FONTDIR 2> /dev/null fi EOT diff --git a/source/x/x11/build/font-adobe-100dpi b/source/x/x11/build/font-adobe-100dpi index 0cfbf0888..00750edc0 100644 --- a/source/x/x11/build/font-adobe-100dpi +++ b/source/x/x11/build/font-adobe-100dpi @@ -1 +1 @@ -2 +3 diff --git a/source/x/x11/build/font-adobe-75dpi b/source/x/x11/build/font-adobe-75dpi index 0cfbf0888..00750edc0 100644 --- a/source/x/x11/build/font-adobe-75dpi +++ b/source/x/x11/build/font-adobe-75dpi @@ -1 +1 @@ -2 +3 diff --git a/source/x/x11/build/font-adobe-utopia-100dpi b/source/x/x11/build/font-adobe-utopia-100dpi index 0cfbf0888..00750edc0 100644 --- a/source/x/x11/build/font-adobe-utopia-100dpi +++ b/source/x/x11/build/font-adobe-utopia-100dpi @@ -1 +1 @@ -2 +3 diff --git a/source/x/x11/build/font-adobe-utopia-75dpi b/source/x/x11/build/font-adobe-utopia-75dpi index 0cfbf0888..00750edc0 100644 --- a/source/x/x11/build/font-adobe-utopia-75dpi +++ b/source/x/x11/build/font-adobe-utopia-75dpi @@ -1 +1 @@ -2 +3 diff --git a/source/x/x11/build/font-adobe-utopia-type1 b/source/x/x11/build/font-adobe-utopia-type1 index 0cfbf0888..00750edc0 100644 --- a/source/x/x11/build/font-adobe-utopia-type1 +++ b/source/x/x11/build/font-adobe-utopia-type1 @@ -1 +1 @@ -2 +3 diff --git a/source/x/x11/build/font-arabic-misc b/source/x/x11/build/font-arabic-misc index 0cfbf0888..00750edc0 100644 --- a/source/x/x11/build/font-arabic-misc +++ b/source/x/x11/build/font-arabic-misc @@ -1 +1 @@ -2 +3 diff --git a/source/x/x11/build/font-bh-100dpi b/source/x/x11/build/font-bh-100dpi index 0cfbf0888..00750edc0 100644 --- a/source/x/x11/build/font-bh-100dpi +++ b/source/x/x11/build/font-bh-100dpi @@ -1 +1 @@ -2 +3 diff --git a/source/x/x11/build/font-bh-75dpi b/source/x/x11/build/font-bh-75dpi index 0cfbf0888..00750edc0 100644 --- a/source/x/x11/build/font-bh-75dpi +++ b/source/x/x11/build/font-bh-75dpi @@ -1 +1 @@ -2 +3 diff --git a/source/x/x11/build/font-bh-lucidatypewriter-100dpi b/source/x/x11/build/font-bh-lucidatypewriter-100dpi index 0cfbf0888..00750edc0 100644 --- a/source/x/x11/build/font-bh-lucidatypewriter-100dpi +++ b/source/x/x11/build/font-bh-lucidatypewriter-100dpi @@ -1 +1 @@ -2 +3 diff --git a/source/x/x11/build/font-bh-lucidatypewriter-75dpi b/source/x/x11/build/font-bh-lucidatypewriter-75dpi index 0cfbf0888..00750edc0 100644 --- a/source/x/x11/build/font-bh-lucidatypewriter-75dpi +++ b/source/x/x11/build/font-bh-lucidatypewriter-75dpi @@ -1 +1 @@ -2 +3 diff --git a/source/x/x11/build/font-bh-ttf b/source/x/x11/build/font-bh-ttf index 0cfbf0888..00750edc0 100644 --- a/source/x/x11/build/font-bh-ttf +++ b/source/x/x11/build/font-bh-ttf @@ -1 +1 @@ -2 +3 diff --git a/source/x/x11/build/font-bh-type1 b/source/x/x11/build/font-bh-type1 index 0cfbf0888..00750edc0 100644 --- a/source/x/x11/build/font-bh-type1 +++ b/source/x/x11/build/font-bh-type1 @@ -1 +1 @@ -2 +3 diff --git a/source/x/x11/build/font-bitstream-100dpi b/source/x/x11/build/font-bitstream-100dpi index 0cfbf0888..00750edc0 100644 --- a/source/x/x11/build/font-bitstream-100dpi +++ b/source/x/x11/build/font-bitstream-100dpi @@ -1 +1 @@ -2 +3 diff --git a/source/x/x11/build/font-bitstream-75dpi b/source/x/x11/build/font-bitstream-75dpi index 0cfbf0888..00750edc0 100644 --- a/source/x/x11/build/font-bitstream-75dpi +++ b/source/x/x11/build/font-bitstream-75dpi @@ -1 +1 @@ -2 +3 diff --git a/source/x/x11/build/font-bitstream-speedo b/source/x/x11/build/font-bitstream-speedo index 0cfbf0888..00750edc0 100644 --- a/source/x/x11/build/font-bitstream-speedo +++ b/source/x/x11/build/font-bitstream-speedo @@ -1 +1 @@ -2 +3 diff --git a/source/x/x11/build/font-bitstream-type1 b/source/x/x11/build/font-bitstream-type1 index 0cfbf0888..00750edc0 100644 --- a/source/x/x11/build/font-bitstream-type1 +++ b/source/x/x11/build/font-bitstream-type1 @@ -1 +1 @@ -2 +3 diff --git a/source/x/x11/build/font-cronyx-cyrillic b/source/x/x11/build/font-cronyx-cyrillic index 0cfbf0888..00750edc0 100644 --- a/source/x/x11/build/font-cronyx-cyrillic +++ b/source/x/x11/build/font-cronyx-cyrillic @@ -1 +1 @@ -2 +3 diff --git a/source/x/x11/build/font-cursor-misc b/source/x/x11/build/font-cursor-misc index 0cfbf0888..00750edc0 100644 --- a/source/x/x11/build/font-cursor-misc +++ b/source/x/x11/build/font-cursor-misc @@ -1 +1 @@ -2 +3 diff --git a/source/x/x11/build/font-daewoo-misc b/source/x/x11/build/font-daewoo-misc index 0cfbf0888..00750edc0 100644 --- a/source/x/x11/build/font-daewoo-misc +++ b/source/x/x11/build/font-daewoo-misc @@ -1 +1 @@ -2 +3 diff --git a/source/x/x11/build/font-dec-misc b/source/x/x11/build/font-dec-misc index 0cfbf0888..00750edc0 100644 --- a/source/x/x11/build/font-dec-misc +++ b/source/x/x11/build/font-dec-misc @@ -1 +1 @@ -2 +3 diff --git a/source/x/x11/build/font-ibm-type1 b/source/x/x11/build/font-ibm-type1 index 0cfbf0888..00750edc0 100644 --- a/source/x/x11/build/font-ibm-type1 +++ b/source/x/x11/build/font-ibm-type1 @@ -1 +1 @@ -2 +3 diff --git a/source/x/x11/build/font-isas-misc b/source/x/x11/build/font-isas-misc index 0cfbf0888..00750edc0 100644 --- a/source/x/x11/build/font-isas-misc +++ b/source/x/x11/build/font-isas-misc @@ -1 +1 @@ -2 +3 diff --git a/source/x/x11/build/font-jis-misc b/source/x/x11/build/font-jis-misc index 0cfbf0888..00750edc0 100644 --- a/source/x/x11/build/font-jis-misc +++ b/source/x/x11/build/font-jis-misc @@ -1 +1 @@ -2 +3 diff --git a/source/x/x11/build/font-micro-misc b/source/x/x11/build/font-micro-misc index 0cfbf0888..00750edc0 100644 --- a/source/x/x11/build/font-micro-misc +++ b/source/x/x11/build/font-micro-misc @@ -1 +1 @@ -2 +3 diff --git a/source/x/x11/build/font-misc-cyrillic b/source/x/x11/build/font-misc-cyrillic index 0cfbf0888..00750edc0 100644 --- a/source/x/x11/build/font-misc-cyrillic +++ b/source/x/x11/build/font-misc-cyrillic @@ -1 +1 @@ -2 +3 diff --git a/source/x/x11/build/font-misc-ethiopic b/source/x/x11/build/font-misc-ethiopic index 0cfbf0888..00750edc0 100644 --- a/source/x/x11/build/font-misc-ethiopic +++ b/source/x/x11/build/font-misc-ethiopic @@ -1 +1 @@ -2 +3 diff --git a/source/x/x11/build/font-misc-meltho b/source/x/x11/build/font-misc-meltho index 0cfbf0888..00750edc0 100644 --- a/source/x/x11/build/font-misc-meltho +++ b/source/x/x11/build/font-misc-meltho @@ -1 +1 @@ -2 +3 diff --git a/source/x/x11/build/font-misc-misc b/source/x/x11/build/font-misc-misc index 0cfbf0888..00750edc0 100644 --- a/source/x/x11/build/font-misc-misc +++ b/source/x/x11/build/font-misc-misc @@ -1 +1 @@ -2 +3 diff --git a/source/x/x11/build/font-mutt-misc b/source/x/x11/build/font-mutt-misc index 0cfbf0888..00750edc0 100644 --- a/source/x/x11/build/font-mutt-misc +++ b/source/x/x11/build/font-mutt-misc @@ -1 +1 @@ -2 +3 diff --git a/source/x/x11/build/font-schumacher-misc b/source/x/x11/build/font-schumacher-misc index 0cfbf0888..00750edc0 100644 --- a/source/x/x11/build/font-schumacher-misc +++ b/source/x/x11/build/font-schumacher-misc @@ -1 +1 @@ -2 +3 diff --git a/source/x/x11/build/font-screen-cyrillic b/source/x/x11/build/font-screen-cyrillic index 0cfbf0888..00750edc0 100644 --- a/source/x/x11/build/font-screen-cyrillic +++ b/source/x/x11/build/font-screen-cyrillic @@ -1 +1 @@ -2 +3 diff --git a/source/x/x11/build/font-sony-misc b/source/x/x11/build/font-sony-misc index 0cfbf0888..00750edc0 100644 --- a/source/x/x11/build/font-sony-misc +++ b/source/x/x11/build/font-sony-misc @@ -1 +1 @@ -2 +3 diff --git a/source/x/x11/build/font-sun-misc b/source/x/x11/build/font-sun-misc index 0cfbf0888..00750edc0 100644 --- a/source/x/x11/build/font-sun-misc +++ b/source/x/x11/build/font-sun-misc @@ -1 +1 @@ -2 +3 diff --git a/source/x/x11/build/font-winitzki-cyrillic b/source/x/x11/build/font-winitzki-cyrillic index 0cfbf0888..00750edc0 100644 --- a/source/x/x11/build/font-winitzki-cyrillic +++ b/source/x/x11/build/font-winitzki-cyrillic @@ -1 +1 @@ -2 +3 diff --git a/source/x/x11/build/font-xfree86-type1 b/source/x/x11/build/font-xfree86-type1 index 0cfbf0888..00750edc0 100644 --- a/source/x/x11/build/font-xfree86-type1 +++ b/source/x/x11/build/font-xfree86-type1 @@ -1 +1 @@ -2 +3 diff --git a/source/x/x11/doinst.sh/font-adobe-100dpi b/source/x/x11/doinst.sh/font-adobe-100dpi index aa6445d1d..aa14cd845 100644 --- a/source/x/x11/doinst.sh/font-adobe-100dpi +++ b/source/x/x11/doinst.sh/font-adobe-100dpi @@ -1,11 +1,9 @@ #!/bin/sh # Update the X font indexes: if [ -x /usr/bin/mkfontdir -o -x /usr/X11R6/bin/mkfontdir ]; then - ( cd /usr/share/fonts/100dpi - mkfontscale . - mkfontdir . - ) + mkfontscale usr/share/fonts/100dpi 2> /dev/null + mkfontdir usr/share/fonts/100dpi 2> /dev/null fi if [ -x /usr/bin/fc-cache ]; then - /usr/bin/fc-cache -f + /usr/bin/fc-cache -f 2> /dev/null fi diff --git a/source/x/x11/doinst.sh/font-adobe-75dpi b/source/x/x11/doinst.sh/font-adobe-75dpi index 94bb53e84..2e1e36a79 100644 --- a/source/x/x11/doinst.sh/font-adobe-75dpi +++ b/source/x/x11/doinst.sh/font-adobe-75dpi @@ -1,11 +1,9 @@ #!/bin/sh # Update the X font indexes: if [ -x /usr/bin/mkfontdir -o -x /usr/X11R6/bin/mkfontdir ]; then - ( cd /usr/share/fonts/75dpi - mkfontscale . - mkfontdir . - ) + mkfontscale usr/share/fonts/75dpi 2> /dev/null + mkfontdir usr/share/fonts/75dpi 2> /dev/null fi if [ -x /usr/bin/fc-cache ]; then - /usr/bin/fc-cache -f + /usr/bin/fc-cache -f 2> /dev/null fi diff --git a/source/x/x11/doinst.sh/font-adobe-utopia-100dpi b/source/x/x11/doinst.sh/font-adobe-utopia-100dpi index aa6445d1d..aa14cd845 100644 --- a/source/x/x11/doinst.sh/font-adobe-utopia-100dpi +++ b/source/x/x11/doinst.sh/font-adobe-utopia-100dpi @@ -1,11 +1,9 @@ #!/bin/sh # Update the X font indexes: if [ -x /usr/bin/mkfontdir -o -x /usr/X11R6/bin/mkfontdir ]; then - ( cd /usr/share/fonts/100dpi - mkfontscale . - mkfontdir . - ) + mkfontscale usr/share/fonts/100dpi 2> /dev/null + mkfontdir usr/share/fonts/100dpi 2> /dev/null fi if [ -x /usr/bin/fc-cache ]; then - /usr/bin/fc-cache -f + /usr/bin/fc-cache -f 2> /dev/null fi diff --git a/source/x/x11/doinst.sh/font-adobe-utopia-75dpi b/source/x/x11/doinst.sh/font-adobe-utopia-75dpi index 94bb53e84..2e1e36a79 100644 --- a/source/x/x11/doinst.sh/font-adobe-utopia-75dpi +++ b/source/x/x11/doinst.sh/font-adobe-utopia-75dpi @@ -1,11 +1,9 @@ #!/bin/sh # Update the X font indexes: if [ -x /usr/bin/mkfontdir -o -x /usr/X11R6/bin/mkfontdir ]; then - ( cd /usr/share/fonts/75dpi - mkfontscale . - mkfontdir . - ) + mkfontscale usr/share/fonts/75dpi 2> /dev/null + mkfontdir usr/share/fonts/75dpi 2> /dev/null fi if [ -x /usr/bin/fc-cache ]; then - /usr/bin/fc-cache -f + /usr/bin/fc-cache -f 2> /dev/null fi diff --git a/source/x/x11/doinst.sh/font-adobe-utopia-type1 b/source/x/x11/doinst.sh/font-adobe-utopia-type1 index e39512692..0946b032f 100644 --- a/source/x/x11/doinst.sh/font-adobe-utopia-type1 +++ b/source/x/x11/doinst.sh/font-adobe-utopia-type1 @@ -1,11 +1,9 @@ #!/bin/sh # Update the X font indexes: if [ -x /usr/bin/mkfontdir -o -x /usr/X11R6/bin/mkfontdir ]; then - ( cd /usr/share/fonts/Type1 - mkfontscale . - mkfontdir . - ) + mkfontscale usr/share/fonts/Type1 2> /dev/null + mkfontdir usr/share/fonts/Type1 2> /dev/null fi if [ -x /usr/bin/fc-cache ]; then - /usr/bin/fc-cache -f + /usr/bin/fc-cache -f 2> /dev/null fi diff --git a/source/x/x11/doinst.sh/font-arabic-misc b/source/x/x11/doinst.sh/font-arabic-misc index 63055f0e1..d1a214bac 100644 --- a/source/x/x11/doinst.sh/font-arabic-misc +++ b/source/x/x11/doinst.sh/font-arabic-misc @@ -1,11 +1,9 @@ #!/bin/sh # Update the X font indexes: if [ -x /usr/bin/mkfontdir -o -x /usr/X11R6/bin/mkfontdir ]; then - ( cd /usr/share/fonts/misc - mkfontscale . - mkfontdir -e /usr/share/fonts/encodings -e /usr/share/fonts/encodings/large . - ) + mkfontscale usr/share/fonts/misc 2> /dev/null + mkfontdir -e /usr/share/fonts/encodings -e /usr/share/fonts/encodings/large usr/share/fonts/misc 2> /dev/null fi if [ -x /usr/bin/fc-cache ]; then - /usr/bin/fc-cache -f + /usr/bin/fc-cache -f 2> /dev/null fi diff --git a/source/x/x11/doinst.sh/font-bh-100dpi b/source/x/x11/doinst.sh/font-bh-100dpi index aa6445d1d..aa14cd845 100644 --- a/source/x/x11/doinst.sh/font-bh-100dpi +++ b/source/x/x11/doinst.sh/font-bh-100dpi @@ -1,11 +1,9 @@ #!/bin/sh # Update the X font indexes: if [ -x /usr/bin/mkfontdir -o -x /usr/X11R6/bin/mkfontdir ]; then - ( cd /usr/share/fonts/100dpi - mkfontscale . - mkfontdir . - ) + mkfontscale usr/share/fonts/100dpi 2> /dev/null + mkfontdir usr/share/fonts/100dpi 2> /dev/null fi if [ -x /usr/bin/fc-cache ]; then - /usr/bin/fc-cache -f + /usr/bin/fc-cache -f 2> /dev/null fi diff --git a/source/x/x11/doinst.sh/font-bh-75dpi b/source/x/x11/doinst.sh/font-bh-75dpi index 94bb53e84..2e1e36a79 100644 --- a/source/x/x11/doinst.sh/font-bh-75dpi +++ b/source/x/x11/doinst.sh/font-bh-75dpi @@ -1,11 +1,9 @@ #!/bin/sh # Update the X font indexes: if [ -x /usr/bin/mkfontdir -o -x /usr/X11R6/bin/mkfontdir ]; then - ( cd /usr/share/fonts/75dpi - mkfontscale . - mkfontdir . - ) + mkfontscale usr/share/fonts/75dpi 2> /dev/null + mkfontdir usr/share/fonts/75dpi 2> /dev/null fi if [ -x /usr/bin/fc-cache ]; then - /usr/bin/fc-cache -f + /usr/bin/fc-cache -f 2> /dev/null fi diff --git a/source/x/x11/doinst.sh/font-bh-lucidatypewriter-100dpi b/source/x/x11/doinst.sh/font-bh-lucidatypewriter-100dpi index aa6445d1d..aa14cd845 100644 --- a/source/x/x11/doinst.sh/font-bh-lucidatypewriter-100dpi +++ b/source/x/x11/doinst.sh/font-bh-lucidatypewriter-100dpi @@ -1,11 +1,9 @@ #!/bin/sh # Update the X font indexes: if [ -x /usr/bin/mkfontdir -o -x /usr/X11R6/bin/mkfontdir ]; then - ( cd /usr/share/fonts/100dpi - mkfontscale . - mkfontdir . - ) + mkfontscale usr/share/fonts/100dpi 2> /dev/null + mkfontdir usr/share/fonts/100dpi 2> /dev/null fi if [ -x /usr/bin/fc-cache ]; then - /usr/bin/fc-cache -f + /usr/bin/fc-cache -f 2> /dev/null fi diff --git a/source/x/x11/doinst.sh/font-bh-lucidatypewriter-75dpi b/source/x/x11/doinst.sh/font-bh-lucidatypewriter-75dpi index 94bb53e84..2e1e36a79 100644 --- a/source/x/x11/doinst.sh/font-bh-lucidatypewriter-75dpi +++ b/source/x/x11/doinst.sh/font-bh-lucidatypewriter-75dpi @@ -1,11 +1,9 @@ #!/bin/sh # Update the X font indexes: if [ -x /usr/bin/mkfontdir -o -x /usr/X11R6/bin/mkfontdir ]; then - ( cd /usr/share/fonts/75dpi - mkfontscale . - mkfontdir . - ) + mkfontscale usr/share/fonts/75dpi 2> /dev/null + mkfontdir usr/share/fonts/75dpi 2> /dev/null fi if [ -x /usr/bin/fc-cache ]; then - /usr/bin/fc-cache -f + /usr/bin/fc-cache -f 2> /dev/null fi diff --git a/source/x/x11/doinst.sh/font-bh-ttf b/source/x/x11/doinst.sh/font-bh-ttf index bdb050188..2056d0734 100644 --- a/source/x/x11/doinst.sh/font-bh-ttf +++ b/source/x/x11/doinst.sh/font-bh-ttf @@ -1,11 +1,9 @@ #!/bin/sh # Update the X font indexes: if [ -x /usr/bin/mkfontdir -o -x /usr/X11R6/bin/mkfontdir ]; then - ( cd /usr/share/fonts/TTF - mkfontscale . - mkfontdir . - ) + mkfontscale usr/share/fonts/TTF 2> /dev/null + mkfontdir usr/share/fonts/TTF 2> /dev/null fi if [ -x /usr/bin/fc-cache ]; then - /usr/bin/fc-cache -f + /usr/bin/fc-cache -f 2> /dev/null fi diff --git a/source/x/x11/doinst.sh/font-bh-type1 b/source/x/x11/doinst.sh/font-bh-type1 index e39512692..0946b032f 100644 --- a/source/x/x11/doinst.sh/font-bh-type1 +++ b/source/x/x11/doinst.sh/font-bh-type1 @@ -1,11 +1,9 @@ #!/bin/sh # Update the X font indexes: if [ -x /usr/bin/mkfontdir -o -x /usr/X11R6/bin/mkfontdir ]; then - ( cd /usr/share/fonts/Type1 - mkfontscale . - mkfontdir . - ) + mkfontscale usr/share/fonts/Type1 2> /dev/null + mkfontdir usr/share/fonts/Type1 2> /dev/null fi if [ -x /usr/bin/fc-cache ]; then - /usr/bin/fc-cache -f + /usr/bin/fc-cache -f 2> /dev/null fi diff --git a/source/x/x11/doinst.sh/font-bitstream-100dpi b/source/x/x11/doinst.sh/font-bitstream-100dpi index aa6445d1d..aa14cd845 100644 --- a/source/x/x11/doinst.sh/font-bitstream-100dpi +++ b/source/x/x11/doinst.sh/font-bitstream-100dpi @@ -1,11 +1,9 @@ #!/bin/sh # Update the X font indexes: if [ -x /usr/bin/mkfontdir -o -x /usr/X11R6/bin/mkfontdir ]; then - ( cd /usr/share/fonts/100dpi - mkfontscale . - mkfontdir . - ) + mkfontscale usr/share/fonts/100dpi 2> /dev/null + mkfontdir usr/share/fonts/100dpi 2> /dev/null fi if [ -x /usr/bin/fc-cache ]; then - /usr/bin/fc-cache -f + /usr/bin/fc-cache -f 2> /dev/null fi diff --git a/source/x/x11/doinst.sh/font-bitstream-75dpi b/source/x/x11/doinst.sh/font-bitstream-75dpi index 94bb53e84..2e1e36a79 100644 --- a/source/x/x11/doinst.sh/font-bitstream-75dpi +++ b/source/x/x11/doinst.sh/font-bitstream-75dpi @@ -1,11 +1,9 @@ #!/bin/sh # Update the X font indexes: if [ -x /usr/bin/mkfontdir -o -x /usr/X11R6/bin/mkfontdir ]; then - ( cd /usr/share/fonts/75dpi - mkfontscale . - mkfontdir . - ) + mkfontscale usr/share/fonts/75dpi 2> /dev/null + mkfontdir usr/share/fonts/75dpi 2> /dev/null fi if [ -x /usr/bin/fc-cache ]; then - /usr/bin/fc-cache -f + /usr/bin/fc-cache -f 2> /dev/null fi diff --git a/source/x/x11/doinst.sh/font-bitstream-speedo b/source/x/x11/doinst.sh/font-bitstream-speedo index 2cbbd2f1b..f8501ec65 100644 --- a/source/x/x11/doinst.sh/font-bitstream-speedo +++ b/source/x/x11/doinst.sh/font-bitstream-speedo @@ -1,11 +1,9 @@ #!/bin/sh # Update the X font indexes: if [ -x /usr/bin/mkfontdir -o -x /usr/X11R6/bin/mkfontdir ]; then - ( cd /usr/share/fonts/Speedo - mkfontscale . - mkfontdir . - ) + mkfontscale usr/share/fonts/Speedo 2> /dev/null + mkfontdir usr/share/fonts/Speedo 2> /dev/null fi if [ -x /usr/bin/fc-cache ]; then - /usr/bin/fc-cache -f + /usr/bin/fc-cache -f 2> /dev/null fi diff --git a/source/x/x11/doinst.sh/font-bitstream-type1 b/source/x/x11/doinst.sh/font-bitstream-type1 index e39512692..0946b032f 100644 --- a/source/x/x11/doinst.sh/font-bitstream-type1 +++ b/source/x/x11/doinst.sh/font-bitstream-type1 @@ -1,11 +1,9 @@ #!/bin/sh # Update the X font indexes: if [ -x /usr/bin/mkfontdir -o -x /usr/X11R6/bin/mkfontdir ]; then - ( cd /usr/share/fonts/Type1 - mkfontscale . - mkfontdir . - ) + mkfontscale usr/share/fonts/Type1 2> /dev/null + mkfontdir usr/share/fonts/Type1 2> /dev/null fi if [ -x /usr/bin/fc-cache ]; then - /usr/bin/fc-cache -f + /usr/bin/fc-cache -f 2> /dev/null fi diff --git a/source/x/x11/doinst.sh/font-cronyx-cyrillic b/source/x/x11/doinst.sh/font-cronyx-cyrillic index 960dd9458..dfe79d958 100644 --- a/source/x/x11/doinst.sh/font-cronyx-cyrillic +++ b/source/x/x11/doinst.sh/font-cronyx-cyrillic @@ -1,11 +1,9 @@ #!/bin/sh # Update the X font indexes: if [ -x /usr/bin/mkfontdir -o -x /usr/X11R6/bin/mkfontdir ]; then - ( cd /usr/share/fonts/cyrillic - mkfontscale . - mkfontdir . - ) + mkfontscale usr/share/fonts/cyrillic 2> /dev/null + mkfontdir usr/share/fonts/cyrillic 2> /dev/null fi if [ -x /usr/bin/fc-cache ]; then - /usr/bin/fc-cache -f + /usr/bin/fc-cache -f 2> /dev/null fi diff --git a/source/x/x11/doinst.sh/font-cursor-misc b/source/x/x11/doinst.sh/font-cursor-misc index 63055f0e1..d1a214bac 100644 --- a/source/x/x11/doinst.sh/font-cursor-misc +++ b/source/x/x11/doinst.sh/font-cursor-misc @@ -1,11 +1,9 @@ #!/bin/sh # Update the X font indexes: if [ -x /usr/bin/mkfontdir -o -x /usr/X11R6/bin/mkfontdir ]; then - ( cd /usr/share/fonts/misc - mkfontscale . - mkfontdir -e /usr/share/fonts/encodings -e /usr/share/fonts/encodings/large . - ) + mkfontscale usr/share/fonts/misc 2> /dev/null + mkfontdir -e /usr/share/fonts/encodings -e /usr/share/fonts/encodings/large usr/share/fonts/misc 2> /dev/null fi if [ -x /usr/bin/fc-cache ]; then - /usr/bin/fc-cache -f + /usr/bin/fc-cache -f 2> /dev/null fi diff --git a/source/x/x11/doinst.sh/font-daewoo-misc b/source/x/x11/doinst.sh/font-daewoo-misc index 63055f0e1..d1a214bac 100644 --- a/source/x/x11/doinst.sh/font-daewoo-misc +++ b/source/x/x11/doinst.sh/font-daewoo-misc @@ -1,11 +1,9 @@ #!/bin/sh # Update the X font indexes: if [ -x /usr/bin/mkfontdir -o -x /usr/X11R6/bin/mkfontdir ]; then - ( cd /usr/share/fonts/misc - mkfontscale . - mkfontdir -e /usr/share/fonts/encodings -e /usr/share/fonts/encodings/large . - ) + mkfontscale usr/share/fonts/misc 2> /dev/null + mkfontdir -e /usr/share/fonts/encodings -e /usr/share/fonts/encodings/large usr/share/fonts/misc 2> /dev/null fi if [ -x /usr/bin/fc-cache ]; then - /usr/bin/fc-cache -f + /usr/bin/fc-cache -f 2> /dev/null fi diff --git a/source/x/x11/doinst.sh/font-dec-misc b/source/x/x11/doinst.sh/font-dec-misc index 63055f0e1..d1a214bac 100644 --- a/source/x/x11/doinst.sh/font-dec-misc +++ b/source/x/x11/doinst.sh/font-dec-misc @@ -1,11 +1,9 @@ #!/bin/sh # Update the X font indexes: if [ -x /usr/bin/mkfontdir -o -x /usr/X11R6/bin/mkfontdir ]; then - ( cd /usr/share/fonts/misc - mkfontscale . - mkfontdir -e /usr/share/fonts/encodings -e /usr/share/fonts/encodings/large . - ) + mkfontscale usr/share/fonts/misc 2> /dev/null + mkfontdir -e /usr/share/fonts/encodings -e /usr/share/fonts/encodings/large usr/share/fonts/misc 2> /dev/null fi if [ -x /usr/bin/fc-cache ]; then - /usr/bin/fc-cache -f + /usr/bin/fc-cache -f 2> /dev/null fi diff --git a/source/x/x11/doinst.sh/font-ibm-type1 b/source/x/x11/doinst.sh/font-ibm-type1 index e39512692..0946b032f 100644 --- a/source/x/x11/doinst.sh/font-ibm-type1 +++ b/source/x/x11/doinst.sh/font-ibm-type1 @@ -1,11 +1,9 @@ #!/bin/sh # Update the X font indexes: if [ -x /usr/bin/mkfontdir -o -x /usr/X11R6/bin/mkfontdir ]; then - ( cd /usr/share/fonts/Type1 - mkfontscale . - mkfontdir . - ) + mkfontscale usr/share/fonts/Type1 2> /dev/null + mkfontdir usr/share/fonts/Type1 2> /dev/null fi if [ -x /usr/bin/fc-cache ]; then - /usr/bin/fc-cache -f + /usr/bin/fc-cache -f 2> /dev/null fi diff --git a/source/x/x11/doinst.sh/font-isas-misc b/source/x/x11/doinst.sh/font-isas-misc index 63055f0e1..d1a214bac 100644 --- a/source/x/x11/doinst.sh/font-isas-misc +++ b/source/x/x11/doinst.sh/font-isas-misc @@ -1,11 +1,9 @@ #!/bin/sh # Update the X font indexes: if [ -x /usr/bin/mkfontdir -o -x /usr/X11R6/bin/mkfontdir ]; then - ( cd /usr/share/fonts/misc - mkfontscale . - mkfontdir -e /usr/share/fonts/encodings -e /usr/share/fonts/encodings/large . - ) + mkfontscale usr/share/fonts/misc 2> /dev/null + mkfontdir -e /usr/share/fonts/encodings -e /usr/share/fonts/encodings/large usr/share/fonts/misc 2> /dev/null fi if [ -x /usr/bin/fc-cache ]; then - /usr/bin/fc-cache -f + /usr/bin/fc-cache -f 2> /dev/null fi diff --git a/source/x/x11/doinst.sh/font-jis-misc b/source/x/x11/doinst.sh/font-jis-misc index 63055f0e1..d1a214bac 100644 --- a/source/x/x11/doinst.sh/font-jis-misc +++ b/source/x/x11/doinst.sh/font-jis-misc @@ -1,11 +1,9 @@ #!/bin/sh # Update the X font indexes: if [ -x /usr/bin/mkfontdir -o -x /usr/X11R6/bin/mkfontdir ]; then - ( cd /usr/share/fonts/misc - mkfontscale . - mkfontdir -e /usr/share/fonts/encodings -e /usr/share/fonts/encodings/large . - ) + mkfontscale usr/share/fonts/misc 2> /dev/null + mkfontdir -e /usr/share/fonts/encodings -e /usr/share/fonts/encodings/large usr/share/fonts/misc 2> /dev/null fi if [ -x /usr/bin/fc-cache ]; then - /usr/bin/fc-cache -f + /usr/bin/fc-cache -f 2> /dev/null fi diff --git a/source/x/x11/doinst.sh/font-micro-misc b/source/x/x11/doinst.sh/font-micro-misc index 63055f0e1..d1a214bac 100644 --- a/source/x/x11/doinst.sh/font-micro-misc +++ b/source/x/x11/doinst.sh/font-micro-misc @@ -1,11 +1,9 @@ #!/bin/sh # Update the X font indexes: if [ -x /usr/bin/mkfontdir -o -x /usr/X11R6/bin/mkfontdir ]; then - ( cd /usr/share/fonts/misc - mkfontscale . - mkfontdir -e /usr/share/fonts/encodings -e /usr/share/fonts/encodings/large . - ) + mkfontscale usr/share/fonts/misc 2> /dev/null + mkfontdir -e /usr/share/fonts/encodings -e /usr/share/fonts/encodings/large usr/share/fonts/misc 2> /dev/null fi if [ -x /usr/bin/fc-cache ]; then - /usr/bin/fc-cache -f + /usr/bin/fc-cache -f 2> /dev/null fi diff --git a/source/x/x11/doinst.sh/font-misc-cyrillic b/source/x/x11/doinst.sh/font-misc-cyrillic index 960dd9458..dfe79d958 100644 --- a/source/x/x11/doinst.sh/font-misc-cyrillic +++ b/source/x/x11/doinst.sh/font-misc-cyrillic @@ -1,11 +1,9 @@ #!/bin/sh # Update the X font indexes: if [ -x /usr/bin/mkfontdir -o -x /usr/X11R6/bin/mkfontdir ]; then - ( cd /usr/share/fonts/cyrillic - mkfontscale . - mkfontdir . - ) + mkfontscale usr/share/fonts/cyrillic 2> /dev/null + mkfontdir usr/share/fonts/cyrillic 2> /dev/null fi if [ -x /usr/bin/fc-cache ]; then - /usr/bin/fc-cache -f + /usr/bin/fc-cache -f 2> /dev/null fi diff --git a/source/x/x11/doinst.sh/font-misc-ethiopic b/source/x/x11/doinst.sh/font-misc-ethiopic index b7227e907..228c73f52 100644 --- a/source/x/x11/doinst.sh/font-misc-ethiopic +++ b/source/x/x11/doinst.sh/font-misc-ethiopic @@ -1,15 +1,11 @@ #!/bin/sh # Update the X font indexes: if [ -x /usr/bin/mkfontdir -o -x /usr/X11R6/bin/mkfontdir ]; then - ( cd /usr/share/fonts/OTF - mkfontscale . - mkfontdir . - ) - ( cd /usr/share/fonts/TTF - mkfontscale . - mkfontdir . - ) + mkfontscale usr/share/fonts/OTF 2> /dev/null + mkfontdir usr/share/fonts/OTF 2> /dev/null + mkfontscale usr/share/fonts/TTF 2> /dev/null + mkfontdir usr/share/fonts/TTF 2> /dev/null fi if [ -x /usr/bin/fc-cache ]; then - /usr/bin/fc-cache -f + /usr/bin/fc-cache -f 2> /dev/null fi diff --git a/source/x/x11/doinst.sh/font-misc-meltho b/source/x/x11/doinst.sh/font-misc-meltho index 0c434b5ae..8ebd90a77 100644 --- a/source/x/x11/doinst.sh/font-misc-meltho +++ b/source/x/x11/doinst.sh/font-misc-meltho @@ -1,11 +1,9 @@ #!/bin/sh # Update the X font indexes: if [ -x /usr/bin/mkfontdir -o -x /usr/X11R6/bin/mkfontdir ]; then - ( cd /usr/share/fonts/OTF - mkfontscale . - mkfontdir . - ) + mkfontscale usr/share/fonts/OTF 2> /dev/null + mkfontdir usr/share/fonts/OTF 2> /dev/null fi if [ -x /usr/bin/fc-cache ]; then - /usr/bin/fc-cache -f + /usr/bin/fc-cache -f 2> /dev/null fi diff --git a/source/x/x11/doinst.sh/font-misc-misc b/source/x/x11/doinst.sh/font-misc-misc index 63055f0e1..d1a214bac 100644 --- a/source/x/x11/doinst.sh/font-misc-misc +++ b/source/x/x11/doinst.sh/font-misc-misc @@ -1,11 +1,9 @@ #!/bin/sh # Update the X font indexes: if [ -x /usr/bin/mkfontdir -o -x /usr/X11R6/bin/mkfontdir ]; then - ( cd /usr/share/fonts/misc - mkfontscale . - mkfontdir -e /usr/share/fonts/encodings -e /usr/share/fonts/encodings/large . - ) + mkfontscale usr/share/fonts/misc 2> /dev/null + mkfontdir -e /usr/share/fonts/encodings -e /usr/share/fonts/encodings/large usr/share/fonts/misc 2> /dev/null fi if [ -x /usr/bin/fc-cache ]; then - /usr/bin/fc-cache -f + /usr/bin/fc-cache -f 2> /dev/null fi diff --git a/source/x/x11/doinst.sh/font-mutt-misc b/source/x/x11/doinst.sh/font-mutt-misc index 63055f0e1..d1a214bac 100644 --- a/source/x/x11/doinst.sh/font-mutt-misc +++ b/source/x/x11/doinst.sh/font-mutt-misc @@ -1,11 +1,9 @@ #!/bin/sh # Update the X font indexes: if [ -x /usr/bin/mkfontdir -o -x /usr/X11R6/bin/mkfontdir ]; then - ( cd /usr/share/fonts/misc - mkfontscale . - mkfontdir -e /usr/share/fonts/encodings -e /usr/share/fonts/encodings/large . - ) + mkfontscale usr/share/fonts/misc 2> /dev/null + mkfontdir -e /usr/share/fonts/encodings -e /usr/share/fonts/encodings/large usr/share/fonts/misc 2> /dev/null fi if [ -x /usr/bin/fc-cache ]; then - /usr/bin/fc-cache -f + /usr/bin/fc-cache -f 2> /dev/null fi diff --git a/source/x/x11/doinst.sh/font-schumacher-misc b/source/x/x11/doinst.sh/font-schumacher-misc index 63055f0e1..d1a214bac 100644 --- a/source/x/x11/doinst.sh/font-schumacher-misc +++ b/source/x/x11/doinst.sh/font-schumacher-misc @@ -1,11 +1,9 @@ #!/bin/sh # Update the X font indexes: if [ -x /usr/bin/mkfontdir -o -x /usr/X11R6/bin/mkfontdir ]; then - ( cd /usr/share/fonts/misc - mkfontscale . - mkfontdir -e /usr/share/fonts/encodings -e /usr/share/fonts/encodings/large . - ) + mkfontscale usr/share/fonts/misc 2> /dev/null + mkfontdir -e /usr/share/fonts/encodings -e /usr/share/fonts/encodings/large usr/share/fonts/misc 2> /dev/null fi if [ -x /usr/bin/fc-cache ]; then - /usr/bin/fc-cache -f + /usr/bin/fc-cache -f 2> /dev/null fi diff --git a/source/x/x11/doinst.sh/font-screen-cyrillic b/source/x/x11/doinst.sh/font-screen-cyrillic index 960dd9458..dfe79d958 100644 --- a/source/x/x11/doinst.sh/font-screen-cyrillic +++ b/source/x/x11/doinst.sh/font-screen-cyrillic @@ -1,11 +1,9 @@ #!/bin/sh # Update the X font indexes: if [ -x /usr/bin/mkfontdir -o -x /usr/X11R6/bin/mkfontdir ]; then - ( cd /usr/share/fonts/cyrillic - mkfontscale . - mkfontdir . - ) + mkfontscale usr/share/fonts/cyrillic 2> /dev/null + mkfontdir usr/share/fonts/cyrillic 2> /dev/null fi if [ -x /usr/bin/fc-cache ]; then - /usr/bin/fc-cache -f + /usr/bin/fc-cache -f 2> /dev/null fi diff --git a/source/x/x11/doinst.sh/font-sony-misc b/source/x/x11/doinst.sh/font-sony-misc index 63055f0e1..d1a214bac 100644 --- a/source/x/x11/doinst.sh/font-sony-misc +++ b/source/x/x11/doinst.sh/font-sony-misc @@ -1,11 +1,9 @@ #!/bin/sh # Update the X font indexes: if [ -x /usr/bin/mkfontdir -o -x /usr/X11R6/bin/mkfontdir ]; then - ( cd /usr/share/fonts/misc - mkfontscale . - mkfontdir -e /usr/share/fonts/encodings -e /usr/share/fonts/encodings/large . - ) + mkfontscale usr/share/fonts/misc 2> /dev/null + mkfontdir -e /usr/share/fonts/encodings -e /usr/share/fonts/encodings/large usr/share/fonts/misc 2> /dev/null fi if [ -x /usr/bin/fc-cache ]; then - /usr/bin/fc-cache -f + /usr/bin/fc-cache -f 2> /dev/null fi diff --git a/source/x/x11/doinst.sh/font-sun-misc b/source/x/x11/doinst.sh/font-sun-misc index 63055f0e1..d1a214bac 100644 --- a/source/x/x11/doinst.sh/font-sun-misc +++ b/source/x/x11/doinst.sh/font-sun-misc @@ -1,11 +1,9 @@ #!/bin/sh # Update the X font indexes: if [ -x /usr/bin/mkfontdir -o -x /usr/X11R6/bin/mkfontdir ]; then - ( cd /usr/share/fonts/misc - mkfontscale . - mkfontdir -e /usr/share/fonts/encodings -e /usr/share/fonts/encodings/large . - ) + mkfontscale usr/share/fonts/misc 2> /dev/null + mkfontdir -e /usr/share/fonts/encodings -e /usr/share/fonts/encodings/large usr/share/fonts/misc 2> /dev/null fi if [ -x /usr/bin/fc-cache ]; then - /usr/bin/fc-cache -f + /usr/bin/fc-cache -f 2> /dev/null fi diff --git a/source/x/x11/doinst.sh/font-winitzki-cyrillic b/source/x/x11/doinst.sh/font-winitzki-cyrillic index 960dd9458..dfe79d958 100644 --- a/source/x/x11/doinst.sh/font-winitzki-cyrillic +++ b/source/x/x11/doinst.sh/font-winitzki-cyrillic @@ -1,11 +1,9 @@ #!/bin/sh # Update the X font indexes: if [ -x /usr/bin/mkfontdir -o -x /usr/X11R6/bin/mkfontdir ]; then - ( cd /usr/share/fonts/cyrillic - mkfontscale . - mkfontdir . - ) + mkfontscale usr/share/fonts/cyrillic 2> /dev/null + mkfontdir usr/share/fonts/cyrillic 2> /dev/null fi if [ -x /usr/bin/fc-cache ]; then - /usr/bin/fc-cache -f + /usr/bin/fc-cache -f 2> /dev/null fi diff --git a/source/x/x11/doinst.sh/font-xfree86-type1 b/source/x/x11/doinst.sh/font-xfree86-type1 index e39512692..0946b032f 100644 --- a/source/x/x11/doinst.sh/font-xfree86-type1 +++ b/source/x/x11/doinst.sh/font-xfree86-type1 @@ -1,11 +1,9 @@ #!/bin/sh # Update the X font indexes: if [ -x /usr/bin/mkfontdir -o -x /usr/X11R6/bin/mkfontdir ]; then - ( cd /usr/share/fonts/Type1 - mkfontscale . - mkfontdir . - ) + mkfontscale usr/share/fonts/Type1 2> /dev/null + mkfontdir usr/share/fonts/Type1 2> /dev/null fi if [ -x /usr/bin/fc-cache ]; then - /usr/bin/fc-cache -f + /usr/bin/fc-cache -f 2> /dev/null fi diff --git a/source/xap/x3270/doinst.sh b/source/xap/x3270/doinst.sh index 049c91e4f..37379ca39 100644 --- a/source/xap/x3270/doinst.sh +++ b/source/xap/x3270/doinst.sh @@ -14,11 +14,9 @@ config etc/X11/x3270/ibm_hosts.new # Update the X font indexes: if [ -x /usr/bin/mkfontdir -o -x /usr/X11R6/bin/mkfontdir ]; then - ( cd /usr/share/fonts/misc - mkfontscale . - mkfontdir -e /usr/share/fonts/encodings -e /usr/share/fonts/encodings/large . - ) + mkfontscale usr/share/fonts/misc 2> /dev/null + mkfontdir -e /usr/share/fonts/encodings -e /usr/share/fonts/encodings/large usr/share/fonts/misc 2> /dev/null fi if [ -x /usr/bin/fc-cache ]; then - /usr/bin/fc-cache -f + /usr/bin/fc-cache -f 2> /dev/null fi diff --git a/source/xap/x3270/x3270.SlackBuild b/source/xap/x3270/x3270.SlackBuild index eba6f7158..1e437eb7f 100755 --- a/source/xap/x3270/x3270.SlackBuild +++ b/source/xap/x3270/x3270.SlackBuild @@ -26,7 +26,7 @@ PKGNAM=x3270 VERSION=3.3 TARBVER=${TARBVER:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} VERSION=$(echo $TARBVER | cut -f 1,2 -d .) -BUILD=${BUILD:-4} +BUILD=${BUILD:-5} # Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then |