[Lunar-commits] <lunar-iso> Substitude installer and added man pages.
Peter de Ridder
peter at lunar-linux.org
Thu Aug 22 18:23:45 CEST 2013
commit c2ad6f4ac21c1bd7c10eee8d6bc6ebc7577e7a6c
Author: Peter de Ridder <peter at lunar-linux.org>
Date: Thu, 15 Aug 2013 23:27:13 -0700
URL: https://github.com/lunar-linux/lunar-iso/commit/c2ad6f4ac21c1bd7c10eee8d6bc6ebc7577e7a6c
Substitude installer and added man pages.
---
lunar-install/sbin/lunar-sysconf | +0/-340
mkfiles/installer.mk | +3/-4
mkfiles/iso.mk | +4/-1
3 files changed, 7 insertions(+), 345 deletions(-)
--- a/lunar-install/sbin/lunar-sysconf
+++ /dev/null
@@ -1,340 +0,0 @@
-#!/bin/bash
-#############################################################
-# portions Copyright 2001 by Kyle Sallee #
-# portions Copyright 2002 by Kagan Kongar #
-# portions Copyright 2002 by rodzilla #
-# portions Copyright 2003, 2004 by tchan, kc8apf #
-# portions Copyright 2004 Auke Kok #
-# #
-# This file in released under the GPL #
-#############################################################
-
-inputbox()
-{
- $DIALOG --nocancel --inputbox "$1" 0 0 "$2"
-}
-
-
-confirm()
-{
- if [ "$CONFIRM" == "off" ]; then
- if [ -n "$2" ]; then
- false
- else
- true
- fi
- else
- $DIALOG $2 --yesno "$1" 8 50
- fi
-}
-
-
-show_keymaps()
-{
- KEYDIR="/usr/share/keymaps/i386"
-
- azerty="$(ls $KEYDIR/azerty)"
- dvorak="$(ls $KEYDIR/dvorak)"
- fgGIod="$(ls $KEYDIR/fgGIod)"
- qwerty="$(ls $KEYDIR/qwerty)"
- qwertz="$(ls $KEYDIR/qwertz)"
-
- MAP_FILES=$(echo -e "$azerty\n$dvorak\n$fgGIod\n$qwerty\n$qwertz" | sort | sed "s/\.kmap\.gz//")
-
- for MAP in $MAP_FILES; do
- echo $MAP
- echo keymap
- done
-}
-
-
-keymap_menu()
-{
- TITLE="Keymap Selection Menu"
- HELP="Please select your preferred keymapping."
- KEYMAPS=$(show_keymaps)
- KEYMAP=`$DIALOG --title "$TITLE" --menu "$HELP" 0 0 0 $KEYMAPS`
-}
-
-
-configure_proxy()
-{
- HTTP_PROMPT="Please enter the HTTP proxy server\nExample: http://192.168.1.1:8080/"
- FTP_PROMPT="Please enter the FTP proxy server\nExample: http://192.168.1.1:8080/"
- NO_PROMPT="Please enter all domains/ip addresses (comma-seperated) proxy should NOT be used for:\nExample: .mit.edu,mysite.com"
- HPROXY=`inputbox "$HTTP_PROMPT"` &&
- FPROXY=`inputbox "$FTP_PROMPT" "$HPROXY"` &&
- NPROXY=`inputbox "$NO_PROMPT"`
-}
-
-
-confirm_proxy_settings()
-{
- FINISHED=NO
- while [ "$FINISHED" != "YES" ]; do
- PROMPT="Are these settings correct?"
- PROMPT="$PROMPT\nHTTP Proxy: $HPROXY"
- PROMPT="$PROMPT\n FTP Proxy: $FPROXY"
- PROMPT="$PROMPT\n No Proxy: $NPROXY"
-
- if confirm "$PROMPT" "--cr-wrap"; then
- FINISHED=YES
- else
- configure_proxy
- FINISHED=NO
- fi
- done
-}
-
-
-proxy_exit_message()
-{
- $DIALOG --cr-wrap --title "Lunar Proxy Settings Complete" --msgbox \
- "Your proxy configuration has been saved.
-
-Please note that these proxy settings will only be used
-by Lunar (wget) and possibly some other command-line utilities.
-
-You will still have to configure proxy settings in your favorite
-web browser, etc..." 12 65
-
-}
-
-
-toggle()
-{
- if [ `eval echo \\$$1` == "on" ]; then
- eval $1=off
- else
- eval $1=on
- fi
-}
-
-
-show_consolefonts()
-{
- FONTDIR="/usr/share/consolefonts"
- cd $FONTDIR
- FONTS=`ls *.gz | sed "s/\.psf\.gz//"`
-
- for FONT in $FONTS; do
- echo $FONT
- echo font
- done
-}
-
-
-font_menu()
-{
- TITLE="Console Font Selection Menu"
- HELP="Please select your preferred console fonts."
- FONTS=`show_consolefonts`
- CONSOLEFONT=`$DIALOG --title "$TITLE" --menu "$HELP" 0 0 0 $FONTS`
-}
-
-
-cut_charmaps()
-{
- while [ -n "$1" ]; do
- echo "$1" | cut -d/ -f1
- echo "$2"
- shift 2
- done
-}
-
-
-show_languages()
-{
- if [ -d $MOONBASE ]; then
- SECTION=`find_section glibc`
- cut_charmaps `cat $MOONBASE/$SECTION/glibc/locales`
- else
- cut_charmaps `cat /etc/lunar/local/locales`
- fi
-}
-
-
-select_lang()
-{
- $DIALOG --title "Language Selection Menu" --menu "$HELP" 0 0 0 `show_languages`
-}
-
-
-lang_menu()
-{
- TITLE="Language Selection Menu"
- HELP="While lunar is entirely in English
-it is possible to change the languages of many other programs.
-Please select your preferred langauge.
-
-This process will ONLY set the LANG environment variable. Do
-not expect any changes till you finish and reboot."
-
- LANG=`select_lang`
- export LANG
- [ ! -e "/etc" ] || echo -e "# you can add declarations for LC_ALL etc in here\n\nexport LANG=\"$LANG\"\n" > /etc/LOCALE
-}
-
-
-editor_menu()
-{
- VI_HELP="good old vi"
- NANO_HELP="nano is an enchanced free pico clone"
- JOE_HELP="joe is a WS compatible editor"
-
- HELP="Actually all are same, we are using e3, only keys differ."
- TITLE="Editor Selection Menu"
-
- EDITOR=`$DIALOG --title "Editor Selection Menu" --item-help --menu "$HELP" 0 0 0 \
- "vi" "" "$VI_HELP" \
- "joe" "" "$JOE_HELP" \
- "nano" "" "$NANO_HELP"`
-
- export EDITOR
- [ ! -e "/etc" ] || echo "export EDITOR=\"$EDITOR\"" > /etc/profile.d/editor.rc
-}
-
-
-show_timezones()
-{
- for ITEM in `ls $LOCALTIME/$1`; do
- if [ -n "$1" ]; then
- echo "$1/$ITEM"
- else
- echo "$ITEM"
- fi
- if [ -d $LOCALTIME/$1/$ITEM ]; then
- echo "Directory"
- else
- echo "Timezone"
- fi
- done
-}
-
-
-timezone()
-{
- LOCALTIME=/usr/share/zoneinfo
- TITLE="Time Zone Selection Menu"
- HELP="Select timezone or directory"
- ZONE=""
-
- while
- TIMEZONES=`show_timezones $ZONE` &&
- ZONE=`$DIALOG --title "$TITLE" \
- --menu \
- "$HELP" \
- 0 0 0 \
- $TIMEZONES` &&
- [ -d $LOCALTIME/$ZONE ]
- do
- true
- done
-
- if [ -f "$LOCALTIME/$ZONE" ]; then
- ln -sf $LOCALTIME/$ZONE /etc/localtime
-
- TITLE="GMT or Local"
- HELP="Does the hardware clock store time in GMT or local?"
-
- CLOCK=`$DIALOG --title "$TITLE" \
- --menu "$HELP" \
- 0 0 0 \
- "GMT" "" \
- "Local" ""` &&
- case $CLOCK in
- GMT) true ;;
- Local) HWCLOCK="/sbin/hwclock --hctosys --localtime"
- echo "#!/bin/sh" > /etc/init.d/localtime
- echo "$HWCLOCK" >> /etc/init.d/localtime
- chmod a+x /etc/init.d/localtime
- ln -s ../init.d/localtime /etc/rcS.d/S15localtime
- ;;
- esac
- fi
-}
-
-
-make_server_keys() {
- make -C /etc/ssh server-keys
- echo -e "\nSSH server keys were created\nPress ENTER to continue."
- read
-}
-
-
-main()
-{
- while true; do
- R_LABEL="Set root password"
- R_HELP="Set the default root password needed to access this system (the default password is empty)"
- H_LABEL="Setup hostname and networking"
- H_HELP="Configure your network devices and hostname settings"
- U_LABEL="Administrate users"
- U_HELP="Edit and create user accounts, groups"
- V_LABEL="Administrate services"
- V_HELP="Configure services to start automatically at boot time"
- G_LABEL="Create SSH server keys"
- G_HELP="Generate the SSH server keys"
- A_LABEL="Select a timezone"
- A_HELP="Select a timezone"
- C_LABEL="Select a keyboard map"
- C_HELP="Select keyboard map"
- D_LABEL="Select a console font"
- D_HELP="Select a console font"
- E_LABEL="Set global language"
- E_HELP="Set global language"
- J_LABEL="Select a default editor"
- J_HELP="Select a default editor"
-
- choices()
- {
- (
- unset IFS
- for CHOICE in R H U V G A C D E J; do
- echo $CHOICE
- eval echo \$${CHOICE}_LABEL
- eval echo \$${CHOICE}_HELP
- done
- )
- }
-
- COMMAND=`$DIALOG --title "$TITLE" --cancel-label "Exit" --default-item "$DEFAULT" --item-help --menu "" 0 0 0 $(choices $CHOICES)`
- if [ $? != 0 ]; then
- return
- fi
-
- DEFAULT=$COMMAND
-
- case $COMMAND in
- R) passwd ;;
- H) lnet ;;
- U) luser ;;
- V) lservices ;;
- G) make_server_keys ;;
- A) timezone ;;
- C) keymap_menu ;;
- D) font_menu ;;
- E) lang_menu ;;
- J) editor_menu ;;
- esac
- done
-}
-
-
-. /etc/lunar/config
-
-export IFS="
-"
-DIALOG="dialog
---backtitle
-Lunar Linux System Configuration %VERSION% - %CODENAME%
---stdout"
-ARCH=`arch`
-
-trap ":" INT QUIT
-
-export PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin"
-# setting this var is supposed to prevent the enviro_check code now!
-export LUNAR_INSTALL=1
-
-main
--- a/mkfiles/installer.mk
+++ b/mkfiles/installer.mk
@@ -4,10 +4,9 @@ installer: lunar-install
# Install the Lunar installer
-$(ISO_TARGET)/.lunar-install: iso-target
+$(ISO_TARGET)/sbin/lunar-install: $(ISO_SOURCE)/lunar-install/sbin/lunar-install iso-target
@echo lunar-install
- @cp -r $(ISO_SOURCE)/lunar-install/* $(ISO_TARGET)
- @touch $@
+ @sed -e 's:%VERSION%:$(ISO_VERSION):g' -e 's:%CODENAME%:$(ISO_CODENAME):g' -e 's:%DATE%:$(ISO_DATE):g' -e 's:%KERNEL%:$(ISO_KERNEL):g' -e 's:%CNAME%:$(ISO_CNAME):g' -e 's:%COPYRIGHTYEAR%:$(ISO_COPYRIGHTYEAR):g' -e 's:%LABEL%:$(ISO_LABEL):' $< > $@
# Generate locale list
$(ISO_TARGET)/usr/share/lunar-install/locale.list: iso-target
@@ -29,4 +28,4 @@ $(ISO_TARGET)/README: $(ISO_SOURCE)/template/README iso-target
$(ISO_TARGET)/usr/share/lunar-install/motd: $(ISO_SOURCE)/template/motd iso-target
@sed -e 's:%VERSION%:$(ISO_VERSION):g' -e 's:%CODENAME%:$(ISO_CODENAME):g' -e 's:%DATE%:$(ISO_DATE):g' -e 's:%KERNEL%:$(ISO_KERNEL):g' -e 's:%CNAME%:$(ISO_CNAME):g' -e 's:%COPYRIGHTYEAR%:$(ISO_COPYRIGHTYEAR):g' -e 's:%LABEL%:$(ISO_LABEL):' $< > $@
-lunar-install: $(ISO_TARGET)/.lunar-install $(ISO_TARGET)/usr/share/lunar-install/locale.list $(ISO_TARGET)/usr/share/lunar-install/moonbase.tar.bz2 $(ISO_TARGET)/README $(ISO_TARGET)/usr/share/lunar-install/motd
+lunar-install: $(ISO_TARGET)/sbin/lunar-install $(ISO_TARGET)/usr/share/lunar-install/locale.list $(ISO_TARGET)/usr/share/lunar-install/moonbase.tar.bz2 $(ISO_TARGET)/README $(ISO_TARGET)/usr/share/lunar-install/motd
--- a/mkfiles/iso.mk
+++ b/mkfiles/iso.mk
@@ -110,7 +110,10 @@ $(ISO_SOURCE)/lunar-$(ISO_VERSION).iso: iso-tools iso-files iso-isolinux iso-str
-m '$(ISO_TARGET)/root/*' \
-m '$(ISO_TARGET)/usr/lib/locale' \
-m '$(ISO_TARGET)/usr/share/locale' \
- -m '$(ISO_TARGET)/usr/share/man' \
+ -m '$(ISO_TARGET)/usr/share/man/man2' \
+ -m '$(ISO_TARGET)/usr/share/man/man3' \
+ -m '$(ISO_TARGET)/usr/share/man/*/man2' \
+ -m '$(ISO_TARGET)/usr/share/man/*/man3' \
-m '$(ISO_TARGET)/usr/share/info' \
-m '$(ISO_TARGET)/usr/share/gtk-doc' \
-m '$(ISO_TARGET)/usr/include' \
More information about the Lunar-commits
mailing list