diff options
author | Daniel Robbins <drobbins@gentoo.org> | 2002-04-10 23:34:46 +0000 |
---|---|---|
committer | Daniel Robbins <drobbins@gentoo.org> | 2002-04-10 23:34:46 +0000 |
commit | cf61150a83365817071d8406c6421f01a2081e41 (patch) | |
tree | eab63cd454989811752c7b9044a782a6c892a57b /sys-apps | |
parent | new package; contributed and fixed up a little (diff) | |
download | gentoo-2-cf61150a83365817071d8406c6421f01a2081e41.tar.gz gentoo-2-cf61150a83365817071d8406c6421f01a2081e41.tar.bz2 gentoo-2-cf61150a83365817071d8406c6421f01a2081e41.zip |
removing some old cruft. Don't worry, it's still in the attic.
Diffstat (limited to 'sys-apps')
40 files changed, 0 insertions, 3147 deletions
diff --git a/sys-apps/bootdisk/files/devices.tgz b/sys-apps/bootdisk/files/devices.tgz Binary files differdeleted file mode 100644 index dc1b38e33bdf..000000000000 --- a/sys-apps/bootdisk/files/devices.tgz +++ /dev/null diff --git a/sys-apps/bootdisk/files/etc.boot/inittab b/sys-apps/bootdisk/files/etc.boot/inittab deleted file mode 100644 index f72ebc333dd3..000000000000 --- a/sys-apps/bootdisk/files/etc.boot/inittab +++ /dev/null @@ -1,34 +0,0 @@ -# -# inittab This file describes how the INIT process should set up -# the system in a certain run-level. -# -# Author: Miquel van Smoorenburg, <miquels@cistron.nl> -# Modified by: Patrick J. Volkerding, <volkerdi@ftp.cdrom.com> -# Modified by: Daniel Robbins, <drobbins@agapesystems.com> - -# -# Default runlevel. - -id:2:initdefault: - -l0:0:wait:/sbin/reboot -nfi -l6:6:wait:/sbin/halt -nfip - -# System initialization (runs when system boots). -si:S:sysinit:/sbin/rc - -# TERMINALS -1:12345:respawn:/sbin/agetty 38400 tty1 linux -2:23:respawn:/sbin/agetty 38400 tty2 linux - -ca:12345:ctrlaltdel:/sbin/shutdown -t1 -r now - -# End of /etc/inittab - - - - - - - - diff --git a/sys-apps/bootdisk/files/etc.boot/ioctl.save b/sys-apps/bootdisk/files/etc.boot/ioctl.save Binary files differdeleted file mode 100644 index b6668c503ebb..000000000000 --- a/sys-apps/bootdisk/files/etc.boot/ioctl.save +++ /dev/null diff --git a/sys-apps/bootdisk/files/etc.boot/mtab b/sys-apps/bootdisk/files/etc.boot/mtab deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/sys-apps/bootdisk/files/etc.boot/mtab +++ /dev/null diff --git a/sys-apps/bootdisk/files/etc/filesystems b/sys-apps/bootdisk/files/etc/filesystems deleted file mode 100644 index bcebcba3d19d..000000000000 --- a/sys-apps/bootdisk/files/etc/filesystems +++ /dev/null @@ -1,19 +0,0 @@ - ext2 - reiserfs - vfat - umsdos - msdos - iso9660 - minix - ntfs - hpfs - ufs - sysv - romfs -nodev autofs -nodev proc -nodev smbfs -nodev nfs -nodev coda -nodev devpts -nodev devfs diff --git a/sys-apps/bootdisk/files/etc/fstab b/sys-apps/bootdisk/files/etc/fstab deleted file mode 100644 index 2c9151c55d92..000000000000 --- a/sys-apps/bootdisk/files/etc/fstab +++ /dev/null @@ -1,10 +0,0 @@ -# /etc/fstab: static file system information. -# -# <fs> <mountpoint> <type> <opts> <dump/pass> -/dev/loop0 / ext2 defaults 0 0 -/dev/ram0 /initrd ext2 defaults 0 0 -proc /proc proc defaults 0 0 -none /dev/pts devpts mode=620 0 0 -none /var/shm shm defaults 0 0 - - diff --git a/sys-apps/bootdisk/files/etc/group b/sys-apps/bootdisk/files/etc/group deleted file mode 100644 index 041663638f8d..000000000000 --- a/sys-apps/bootdisk/files/etc/group +++ /dev/null @@ -1,13 +0,0 @@ -root::0:root -bin::1:root,bin,daemon -daemon::2:root,bin,daemon -sys::3:root,bin,adm -adm::4:root,adm,daemon -tty::5: -disk::6:root,adm -mem::8: -kmem::9: -wheel::10:root -floppy::11:root -console::17:console -ftp::21: diff --git a/sys-apps/bootdisk/files/etc/hostname b/sys-apps/bootdisk/files/etc/hostname deleted file mode 100644 index bdd83adc451d..000000000000 --- a/sys-apps/bootdisk/files/etc/hostname +++ /dev/null @@ -1 +0,0 @@ -gentoo-box diff --git a/sys-apps/bootdisk/files/etc/inittab b/sys-apps/bootdisk/files/etc/inittab deleted file mode 100644 index f72ebc333dd3..000000000000 --- a/sys-apps/bootdisk/files/etc/inittab +++ /dev/null @@ -1,34 +0,0 @@ -# -# inittab This file describes how the INIT process should set up -# the system in a certain run-level. -# -# Author: Miquel van Smoorenburg, <miquels@cistron.nl> -# Modified by: Patrick J. Volkerding, <volkerdi@ftp.cdrom.com> -# Modified by: Daniel Robbins, <drobbins@agapesystems.com> - -# -# Default runlevel. - -id:2:initdefault: - -l0:0:wait:/sbin/reboot -nfi -l6:6:wait:/sbin/halt -nfip - -# System initialization (runs when system boots). -si:S:sysinit:/sbin/rc - -# TERMINALS -1:12345:respawn:/sbin/agetty 38400 tty1 linux -2:23:respawn:/sbin/agetty 38400 tty2 linux - -ca:12345:ctrlaltdel:/sbin/shutdown -t1 -r now - -# End of /etc/inittab - - - - - - - - diff --git a/sys-apps/bootdisk/files/etc/install.conf b/sys-apps/bootdisk/files/etc/install.conf deleted file mode 100644 index 3ea0e684e8eb..000000000000 --- a/sys-apps/bootdisk/files/etc/install.conf +++ /dev/null @@ -1,35 +0,0 @@ -# Uncomment the following if you dont't want to generate the devices - -NODEV="yes" - -# OSNAME -OSNAME="gentoolinux" -ARCH="i486-pc-linux-gnu" - -# Enter your partition information here -# ROOT has to be reiserfs ! - -MYROOTPART="hda1" -MYSWAPPART="hda7" - -# Time information - -GMT="n" -timezone="Europe/Berlin" - -# Keyboardlayout - -keymap="de-latin1-nodeadkeys" - -# Network - -hostname=linux.mydomain - -nameserver="192.168.2.3" -eth0=tulip -eth0_ip="192.168.1.4" -eth0_bcast="192.168.1.255" -eth0_mask="255.255.255.0" -eth0_net="192.168.1.0" -eth0_gw="192.168.1.1" - diff --git a/sys-apps/bootdisk/files/etc/ioctl.save b/sys-apps/bootdisk/files/etc/ioctl.save Binary files differdeleted file mode 100644 index b6668c503ebb..000000000000 --- a/sys-apps/bootdisk/files/etc/ioctl.save +++ /dev/null diff --git a/sys-apps/bootdisk/files/etc/login.defs b/sys-apps/bootdisk/files/etc/login.defs deleted file mode 100644 index 3ddffd5398b1..000000000000 --- a/sys-apps/bootdisk/files/etc/login.defs +++ /dev/null @@ -1,45 +0,0 @@ -FAIL_DELAY 3 -FAILLOG_ENAB yes -LOG_UNKFAIL_ENAB no -DIALUPS_CHECK_ENAB yes -LOG_OK_LOGINS no -LASTLOG_ENAB yes -MAIL_CHECK_ENAB yes -OBSCURE_CHECKS_ENAB yes -PORTTIME_CHECKS_ENAB yes -QUOTAS_ENAB yes -SYSLOG_SU_ENAB yes -SYSLOG_SG_ENAB yes -CONSOLE /etc/securetty -MOTD_FILE /etc/motd -FTMP_FILE /var/log/btmpFAIL_DELAY 3 -ENV_HZ HZ=100 -ENV_SUPATH PATH=/sbin:/bin:/usr/sbin:/usr/bin -ENV_PATH PATH=/bin:/usr/bin -TTYGROUP tty -TTYPERM 0600 -ERASECHAR 0177 -KILLCHAR 025 -UMASK 022 -PASS_MAX_DAYS 99999 -PASS_MIN_DAYS 0 -PASS_MIN_LEN 5 -PASS_WARN_AGE 7 -SU_WHEEL_ONLY no -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 -CHFN_AUTH yes -CHFN_RESTRICT rwh -#MD5_CRYPT_ENAB yes -DEFAULT_HOME yes -ENVIRON_FILE /etc/environment -CREATE_HOME yes -NOLOGINS_FILE /etc/nologin -SU_NAME su - diff --git a/sys-apps/bootdisk/files/etc/mtab b/sys-apps/bootdisk/files/etc/mtab deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/sys-apps/bootdisk/files/etc/mtab +++ /dev/null diff --git a/sys-apps/bootdisk/files/etc/nsswitch.conf b/sys-apps/bootdisk/files/etc/nsswitch.conf deleted file mode 100644 index ea3c29839985..000000000000 --- a/sys-apps/bootdisk/files/etc/nsswitch.conf +++ /dev/null @@ -1,16 +0,0 @@ -passwd: files -group: files -hosts: files -networks: files -services: files -protocols: files -rpc: files -ethers: files -netmasks: files -netgroup: files -bootparams: files -automount: files -aliases: files - - - diff --git a/sys-apps/bootdisk/files/etc/pam.conf b/sys-apps/bootdisk/files/etc/pam.conf deleted file mode 100644 index c00699235ea4..000000000000 --- a/sys-apps/bootdisk/files/etc/pam.conf +++ /dev/null @@ -1,18 +0,0 @@ -# ---------------------------------------------------------------------------# -# /etc/pam.conf # -# # -# Last modified by Andrew G. Morgan <morgan@parc.power.net> # -# ---------------------------------------------------------------------------# -# $Id: pam.conf,v 1.2 2000/12/28 19:59:11 achim Exp $ -# ---------------------------------------------------------------------------# -# serv. module ctrl module [path] ...[args..] # -# name type flag # -# ---------------------------------------------------------------------------# -# -# The PAM configuration file for the `chfn' service -# -other auth optional /lib/pam_permit.so -other account optional /lib/pam_permit.so -other password optional /lib/pam_permit.so -other session optional /lib/pam_permit.so - diff --git a/sys-apps/bootdisk/files/etc/passwd b/sys-apps/bootdisk/files/etc/passwd deleted file mode 100644 index a1cf9076b2dc..000000000000 --- a/sys-apps/bootdisk/files/etc/passwd +++ /dev/null @@ -1,8 +0,0 @@ -halt:x:7:0:halt:/sbin:/sbin/halt -operator:x:11:0:operator:/root:/bin/bash -root:x:0:0::/root:/bin/bash -shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown -sync:x:5:0:sync:/sbin:/bin/sync -bin:x:1:1:bin:/bin: -daemon:x:2:2:daemon:/sbin: -adm:x:3:4:adm:/var/adm: diff --git a/sys-apps/bootdisk/files/etc/profile b/sys-apps/bootdisk/files/etc/profile deleted file mode 100644 index a0adefabf58e..000000000000 --- a/sys-apps/bootdisk/files/etc/profile +++ /dev/null @@ -1,5 +0,0 @@ -alias d="ls --color" -alias ll="ls --color -l" - -export PS1='\[\033[01;34;40m\]\W > \[\033[00m\]' -export PATH=/sbin:/bin:/usr/sbin:/usr/bin diff --git a/sys-apps/bootdisk/files/etc/protocols b/sys-apps/bootdisk/files/etc/protocols deleted file mode 100644 index ebaa179b079a..000000000000 --- a/sys-apps/bootdisk/files/etc/protocols +++ /dev/null @@ -1,44 +0,0 @@ -# /etc/protocols: -# $Id: protocols,v 1.1 2000/12/02 05:07:22 achim Exp $ -# -# Internet (IP) protocols -# -# from: @(#)protocols 5.1 (Berkeley) 4/17/89 -# -# Updated for NetBSD based on RFC 1340, Assigned Numbers (July 1992). - -ip 0 IP # internet protocol, pseudo protocol number -icmp 1 ICMP # internet control message protocol -igmp 2 IGMP # Internet Group Management -ggp 3 GGP # gateway-gateway protocol -ipencap 4 IP-ENCAP # IP encapsulated in IP (officially ``IP'') -st 5 ST # ST datagram mode -tcp 6 TCP # transmission control protocol -egp 8 EGP # exterior gateway protocol -pup 12 PUP # PARC universal packet protocol -udp 17 UDP # user datagram protocol -hmp 20 HMP # host monitoring protocol -xns-idp 22 XNS-IDP # Xerox NS IDP -rdp 27 RDP # "reliable datagram" protocol -iso-tp4 29 ISO-TP4 # ISO Transport Protocol class 4 -xtp 36 XTP # Xpress Tranfer Protocol -ddp 37 DDP # Datagram Delivery Protocol -idpr-cmtp 38 IDPR-CMTP # IDPR Control Message Transport -ipv6 41 IPv6 # IPv6 -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 # Reservation Protocol -gre 47 GRE # General Routing Encapsulation -esp 50 ESP # Encap Security Payload for IPv6 -ah 51 AH # Authentication Header for IPv6 -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 -rspf 73 RSPF # Radio Shortest Path First. -vmtp 81 VMTP # Versatile Message Transport -ospf 89 OSPFIGP # Open Shortest Path First IGP -ipip 94 IPIP # IP-within-IP Encapsulation Protocol -encap 98 ENCAP # Yet Another IP encapsulation -pim 103 PIM # Protocol Independent Multicast diff --git a/sys-apps/bootdisk/files/etc/rc b/sys-apps/bootdisk/files/etc/rc deleted file mode 100755 index 05dd7dce2708..000000000000 --- a/sys-apps/bootdisk/files/etc/rc +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -# rc This file is responsible for starting/stopping -# services when the runlevel changes. -/bin/hostname gentoo-box -/bin/mount -at nonfs -cd / - - diff --git a/sys-apps/bootdisk/files/etc/rc.d/config/basic b/sys-apps/bootdisk/files/etc/rc.d/config/basic deleted file mode 100644 index 993cdd1a051c..000000000000 --- a/sys-apps/bootdisk/files/etc/rc.d/config/basic +++ /dev/null @@ -1,15 +0,0 @@ -SYSLOGD="-r" # For remote UDP logging use SYSLOGD="-r" -KEYMAP="de-latin1-nodeadkeys" -CONSOLEFONT="grfixed" # yout favourite console font -KLOGD="" # Use KLOGD="-k /boot/System.map-$(uname -r)" to specify System.map -SULOGIN=no # Set to yes if you want sulogin to be spawned on bootup -DELAYLOGIN=yes # Set to no if you want to be able to login overtelnet/rlogin - # before system startup is complete (as soon as inetd is started) -GMT=no # Set GMT to "yes" if your system clock is set to GMT, and GMT to "no" if not. -VERBOSE=yes # Set VERBOSE to "no" if you would like a more quiet bootup. -FSCKFIX=no # Set FSCKFIX to "yes" if you want to add "-y" to the fsck at startup. -ARCH=`uname -m` # Architecture - - -FTPUSER="ftp" # User to run oftpd as -FTPROOT="/home/ftp" # Set this to your ftproot for oftpd diff --git a/sys-apps/bootdisk/files/etc/rc.d/config/functions b/sys-apps/bootdisk/files/etc/rc.d/config/functions deleted file mode 100644 index 94c289bd36bf..000000000000 --- a/sys-apps/bootdisk/files/etc/rc.d/config/functions +++ /dev/null @@ -1,108 +0,0 @@ -CM="32;01" -CE="31;01" -NORMAL="\033[0m" -ENOCH_GOOD=$'\e[32m' -ENOCH_BAD=$'\e[34;01m' -ENOCH_NORMAL=$'\e[0m' -ENOCH_HILITE=$'\e[36;01m' -ENOCH_ENDCOL=$'\e[A\e[73G' - -export PATH="/bin:/sbin:/usr/bin:/usr/sbin" - -function eecho() { - echo "${*}" - if [ -n "$BOOTING" ] - then - echo "${*}" >&2 - fi -} - -function ebegin() { - eecho "${*}..." - } - -function eerror() { - eecho ">>$ENOCH_BAD ${*}$ENOCH_NORMAL" - } - -function eend() { - if [ $1 -eq 0 ]; then - eecho "$ENOCH_ENDCOL$ENOCH_NORMAL[$ENOCH_GOOD ok $ENOCH_NORMAL]" - else - if [ $# -ge 2 ]; then - shift - eerror $* - fi - eecho "$ENOCH_ENDCOL$ENOCH_NORMAL[$ENOCH_BAD oops $ENOCH_NORMAL]" - fi - } - -function doservice() { - WHOISME=`/usr/bin/whoami` - if [ -x "$WHOISME" ] - then - if [ "${WHOISME}" != "root" ]; then - eerror "You must be root to do this." - exit 2 - fi - fi - if [ $# -ne 1 ]; then - doservice usage - exit 1 - fi - for arf in $opts; do - eval do_${arf}=1 - done - - case $1 in - start) - if [ ! $do_start ]; then - doservice usage - else - start - fi - ;; - stop) - if [ ! $do_stop ]; then - doservice usage - else - stop - fi - ;; - reconfig) - if [ ! $do_reconfig ]; then - doservice usage - else - reconfig - fi - ;; - restart) - if ! (( $do_start && $do_stop )); then - doservice usage - else - stop - sleep 3 - start - fi - ;; - *) - foof="Usage: ${SERVICE} {" - for moof in $opts; do - foof="${foof}${moof}|" - done - if (( $do_start && $do_stop )); then - foof="${foof}restart" - fi - eecho "${foof}" - ;; - esac - } - -function einfo() { - eecho "$ENOCH_HILITE$1$ENOCH_NORMAL" - } - -function einfon() { - eecho -n "$ENOCH_HILITE$1$ENOCH_NORMAL" - } - diff --git a/sys-apps/bootdisk/files/etc/rc.d/config/runlevels b/sys-apps/bootdisk/files/etc/rc.d/config/runlevels deleted file mode 100644 index 4dea7e973b47..000000000000 --- a/sys-apps/bootdisk/files/etc/rc.d/config/runlevels +++ /dev/null @@ -1,15 +0,0 @@ -#Text names for runlevels - -desc0="gentoolinux" -desc1="i686-pc-linux-gnu" -desc2="K"`uname -r` -rlboot=" Boot " -rlhalt="Shutdown Complete -- Ready to Power Down" -rl[0]="Shutdown" -rl[1]=" Single " -rl[2]=" No Net " -rl[3]="Standard" -rl[4]="XWindows" -rl[5]=" Custom " -rl[6]=" Reboot " - diff --git a/sys-apps/bootdisk/files/etc/rpc b/sys-apps/bootdisk/files/etc/rpc deleted file mode 100644 index a80522f4db38..000000000000 --- a/sys-apps/bootdisk/files/etc/rpc +++ /dev/null @@ -1,68 +0,0 @@ -#ident "@(#)rpc 1.11 95/07/14 SMI" /* SVr4.0 1.2 */ -# -# rpc -# -portmapper 100000 portmap sunrpc rpcbind -rstatd 100001 rstat rup perfmeter rstat_svc -rusersd 100002 rusers -nfs 100003 nfsprog -ypserv 100004 ypprog -mountd 100005 mount showmount -ypbind 100007 -walld 100008 rwall shutdown -yppasswdd 100009 yppasswd -etherstatd 100010 etherstat -rquotad 100011 rquotaprog quota rquota -sprayd 100012 spray -3270_mapper 100013 -rje_mapper 100014 -selection_svc 100015 selnsvc -database_svc 100016 -rexd 100017 rex -alis 100018 -sched 100019 -llockmgr 100020 -nlockmgr 100021 -x25.inr 100022 -statmon 100023 -status 100024 -bootparam 100026 -ypupdated 100028 ypupdate -keyserv 100029 keyserver -sunlink_mapper 100033 -tfsd 100037 -nsed 100038 -nsemntd 100039 -showfhd 100043 showfh -ioadmd 100055 rpc.ioadmd -NETlicense 100062 -sunisamd 100065 -debug_svc 100066 dbsrv -ypxfrd 100069 rpc.ypxfrd -bugtraqd 100071 -kerbd 100078 -event 100101 na.event # SunNet Manager -logger 100102 na.logger # SunNet Manager -sync 100104 na.sync -hostperf 100107 na.hostperf -activity 100109 na.activity # SunNet Manager -hostmem 100112 na.hostmem -sample 100113 na.sample -x25 100114 na.x25 -ping 100115 na.ping -rpcnfs 100116 na.rpcnfs -hostif 100117 na.hostif -etherif 100118 na.etherif -iproutes 100120 na.iproutes -layers 100121 na.layers -snmp 100122 na.snmp snmp-cmc snmp-synoptics snmp-unisys snmp-utk -traffic 100123 na.traffic -nfs_acl 100227 -sadmind 100232 -nisd 100300 rpc.nisd -nispasswd 100303 rpc.nispasswdd -ufsd 100233 ufsd -pcnfsd 150001 pcnfs -amd 300019 amq -bwnfsd 545580417 -fypxfrd 600100069 freebsd-ypxfrd diff --git a/sys-apps/bootdisk/files/etc/services b/sys-apps/bootdisk/files/etc/services deleted file mode 100644 index b841db237c73..000000000000 --- a/sys-apps/bootdisk/files/etc/services +++ /dev/null @@ -1,355 +0,0 @@ -# /etc/services: -# $Id: services,v 1.1 2000/12/02 05:07:22 achim Exp $ -# -# Network services, Internet style -# -# Note that it is presently the policy of IANA to assign a single well-known -# port number for both TCP and UDP; hence, most entries here have two entries -# even if the protocol doesn't support UDP operations. -# Updated from RFC 1700, ``Assigned Numbers'' (October 1994). Not all ports -# are included, only the more common ones. - -tcpmux 1/tcp # TCP port service multiplexer -echo 7/tcp -echo 7/udp -discard 9/tcp sink null -discard 9/udp sink null -systat 11/tcp users -daytime 13/tcp -daytime 13/udp -netstat 15/tcp -qotd 17/tcp quote -msp 18/tcp # message send protocol -msp 18/udp # message send protocol -chargen 19/tcp ttytst source -chargen 19/udp ttytst source -ftp-data 20/tcp -ftp 21/tcp -fsp 21/udp fspd -ssh 22/tcp # SSH Remote Login Protocol -ssh 22/udp # SSH Remote Login Protocol -telnet 23/tcp -# 24 - private -smtp 25/tcp mail -# 26 - unassigned -time 37/tcp timserver -time 37/udp timserver -rlp 39/udp resource # resource location -nameserver 42/tcp name # IEN 116 -whois 43/tcp nicname -re-mail-ck 50/tcp # Remote Mail Checking Protocol -re-mail-ck 50/udp # Remote Mail Checking Protocol -domain 53/tcp nameserver # name-domain server -domain 53/udp nameserver -mtp 57/tcp # deprecated -bootps 67/tcp # BOOTP server -bootps 67/udp -bootpc 68/tcp # BOOTP client -bootpc 68/udp -tftp 69/udp -gopher 70/tcp # Internet Gopher -gopher 70/udp -rje 77/tcp netrjs -finger 79/tcp -www 80/tcp http # WorldWideWeb HTTP -www 80/udp # HyperText Transfer Protocol -link 87/tcp ttylink -kerberos 88/tcp kerberos5 krb5 # Kerberos v5 -kerberos 88/udp kerberos5 krb5 # Kerberos v5 -supdup 95/tcp -# 100 - reserved -hostnames 101/tcp hostname # usually from sri-nic -iso-tsap 102/tcp tsap # part of ISODE. -csnet-ns 105/tcp cso-ns # also used by CSO name server -csnet-ns 105/udp cso-ns -# unfortunately the poppassd (Eudora) uses a port which has already -# been assigned to a different service. We list the poppassd as an -# alias here. This should work for programs asking for this service. -# (due to a bug in inetd the 3com-tsmux line is disabled) -#3com-tsmux 106/tcp poppassd -#3com-tsmux 106/udp poppassd -rtelnet 107/tcp # Remote Telnet -rtelnet 107/udp -pop-2 109/tcp postoffice # POP version 2 -pop-2 109/udp -pop-3 110/tcp # POP version 3 -pop-3 110/udp -sunrpc 111/tcp portmapper # RPC 4.0 portmapper TCP -sunrpc 111/udp portmapper # RPC 4.0 portmapper UDP -auth 113/tcp authentication tap ident -sftp 115/tcp -uucp-path 117/tcp -nntp 119/tcp readnews untp # USENET News Transfer Protocol -ntp 123/tcp -ntp 123/udp # Network Time Protocol -netbios-ns 137/tcp # NETBIOS Name Service -netbios-ns 137/udp -netbios-dgm 138/tcp # NETBIOS Datagram Service -netbios-dgm 138/udp -netbios-ssn 139/tcp # NETBIOS session service -netbios-ssn 139/udp -imap2 143/tcp # Interim Mail Access Proto v2 -imap2 143/udp -snmp 161/udp # Simple Net Mgmt Proto -snmp-trap 162/udp snmptrap # Traps for SNMP -cmip-man 163/tcp # ISO mgmt over IP (CMOT) -cmip-man 163/udp -cmip-agent 164/tcp -cmip-agent 164/udp -mailq 174/tcp # Mailer transport queue for Zmailer -mailq 174/udp # Mailer transport queue for Zmailer -xdmcp 177/tcp # X Display Mgr. Control Proto -xdmcp 177/udp -nextstep 178/tcp NeXTStep NextStep # NeXTStep window -nextstep 178/udp NeXTStep NextStep # server -bgp 179/tcp # Border Gateway Proto. -bgp 179/udp -prospero 191/tcp # Cliff Neuman's Prospero -prospero 191/udp -irc 194/tcp # Internet Relay Chat -irc 194/udp -smux 199/tcp # SNMP Unix Multiplexer -smux 199/udp -at-rtmp 201/tcp # AppleTalk routing -at-rtmp 201/udp -at-nbp 202/tcp # AppleTalk name binding -at-nbp 202/udp -at-echo 204/tcp # AppleTalk echo -at-echo 204/udp -at-zis 206/tcp # AppleTalk zone information -at-zis 206/udp -qmtp 209/tcp # The Quick Mail Transfer Protocol -qmtp 209/udp # The Quick Mail Transfer Protocol -z3950 210/tcp wais # NISO Z39.50 database -z3950 210/udp wais -ipx 213/tcp # IPX -ipx 213/udp -imap3 220/tcp # Interactive Mail Access -imap3 220/udp # Protocol v3 -rpc2portmap 369/tcp -rpc2portmap 369/udp # Coda portmapper -codaauth2 370/tcp -codaauth2 370/udp # Coda authentication server -ulistserv 372/tcp # UNIX Listserv -ulistserv 372/udp -ldap 389/tcp # Lightweight Directory Access Protocol -ldap 389/udp # Lightweight Directory Access Protocol -https 443/tcp # MCom -https 443/udp # MCom -snpp 444/tcp # Simple Network Paging Protocol -snpp 444/udp # Simple Network Paging Protocol -saft 487/tcp # Simple Asynchronous File Transfer -saft 487/udp # Simple Asynchronous File Transfer -npmp-local 610/tcp dqs313_qmaster # npmp-local / DQS -npmp-local 610/udp dqs313_qmaster # npmp-local / DQS -npmp-gui 611/tcp dqs313_execd # npmp-gui / DQS -npmp-gui 611/udp dqs313_execd # npmp-gui / DQS -hmmp-ind 612/tcp dqs313_intercell# HMMP Indication / DQS -hmmp-ind 612/udp dqs313_intercell# HMMP Indication / DQS -# -# UNIX specific services -# -exec 512/tcp -biff 512/udp comsat -login 513/tcp -who 513/udp whod -shell 514/tcp cmd # no passwords used -syslog 514/udp -printer 515/tcp spooler # line printer spooler -talk 517/udp -ntalk 518/udp -route 520/udp router routed # RIP -timed 525/udp timeserver -tempo 526/tcp newdate -courier 530/tcp rpc -conference 531/tcp chat -netnews 532/tcp readnews -netwall 533/udp # -for emergency broadcasts -gdomap 538/tcp # GNUstep distributed objects -gdomap 538/udp # GNUstep distributed objects -uucp 540/tcp uucpd # uucp daemon -afpovertcp 548/tcp # AFP over TCP -afpovertcp 548/udp # AFP over TCP -remotefs 556/tcp rfs_server rfs # Brunhoff remote filesystem -klogin 543/tcp # Kerberized `rlogin' (v5) -kshell 544/tcp krcmd # Kerberized `rsh' (v5) -nntps 563/tcp snntp # NNTP over SSL -nntps 563/udp snntp # NNTP over SSL -ldaps 636/tcp # LDAP over SSL -ldaps 636/udp # LDAP over SSL -kerberos-adm 749/tcp # Kerberos `kadmin' (v5) -# -webster 765/tcp # Network dictionary -webster 765/udp -rsync 873/tcp # rsync -rsync 873/udp # rsync -imaps 993/tcp # IMAP over SSL -imaps 993/udp # IMAP over SSL -pop3s 995/tcp # POP-3 over SSL -pop3s 995/udp # POP-3 over SSL -# -# From ``Assigned Numbers'': -# -#> The Registered Ports are not controlled by the IANA and on most systems -#> can be used by ordinary user processes or programs executed by ordinary -#> users. -# -#> Ports are used in the TCP [45,106] to name the ends of logical -#> connections which carry long term conversations. For the purpose of -#> providing services to unknown callers, a service contact port is -#> defined. This list specifies the port used by the server process as its -#> contact port. While the IANA can not control uses of these ports it -#> does register or list uses of these ports as a convienence to the -#> community. -# -socks 1080/tcp # socks proxy server -socks 1080/udp # socks proxy server -ingreslock 1524/tcp -ingreslock 1524/udp -prospero-np 1525/tcp # Prospero non-privileged -prospero-np 1525/udp -datametrics 1645/tcp old-radius # datametrics / old radius entry -datametrics 1645/udp old-radius # datametrics / old radius entry -sa-msg-port 1646/tcp old-radacct # sa-msg-port / old radacct entry -sa-msg-port 1646/udp old-radacct # sa-msg-port / old radacct entry -radius 1812/tcp # Radius -radius 1812/udp # Radius -radacct 1813/tcp # Radius Accounting -radacct 1813/udp # Radius Accounting -cvspserver 2401/tcp # CVS client/server operations -cvspserver 2401/udp # CVS client/server operations -venus 2430/tcp # codacon port -venus 2430/udp # Venus callback/wbc interface -venus-se 2431/tcp # tcp side effects -venus-se 2431/udp # udp sftp side effect -codasrv 2432/tcp # not used -codasrv 2432/udp # server port -codasrv-se 2433/tcp # tcp side effects -codasrv-se 2433/udp # udp sftp side effect -dict 2628/tcp # Dictionary server -dict 2628/udp # Dictionary server -icpv2 3130/tcp icp # Internet Cache Protocol (Squid) -icpv2 3130/udp icp # Internet Cache Protocol (Squid) -mysql 3306/tcp # MySQL -mysql 3306/udp # MySQL -rfe 5002/tcp # Radio Free Ethernet -rfe 5002/udp # Actually uses UDP only -cfengine 5308/tcp # CFengine -cfengine 5308/udp # CFengine -afs3-fileserver 7000/tcp bbs # file server itself -afs3-fileserver 7000/udp bbs # file server itself -afs3-callback 7001/tcp # callbacks to cache managers -afs3-callback 7001/udp # callbacks to cache managers -afs3-prserver 7002/tcp # users & groups database -afs3-prserver 7002/udp # users & groups database -afs3-vlserver 7003/tcp # volume location database -afs3-vlserver 7003/udp # volume location database -afs3-kaserver 7004/tcp # AFS/Kerberos authentication -afs3-kaserver 7004/udp # AFS/Kerberos authentication -afs3-volser 7005/tcp # volume managment server -afs3-volser 7005/udp # volume managment server -afs3-errors 7006/tcp # error interpretation service -afs3-errors 7006/udp # error interpretation service -afs3-bos 7007/tcp # basic overseer process -afs3-bos 7007/udp # basic overseer process -afs3-update 7008/tcp # server-to-server updater -afs3-update 7008/udp # server-to-server updater -afs3-rmtsys 7009/tcp # remote cache manager service -afs3-rmtsys 7009/udp # remote cache manager service -wnn6 22273/tcp # wnn6 -wnn6 22273/udp # wnn6 -# -#========================================================================= -# The remaining port numbers are not as allocated by IANA. -# -# Kerberos (Project Athena/MIT) services -# Note that these are for Kerberos v4, and are unofficial. Sites running -# v4 should uncomment these and comment out the v5 entries above. -# -kerberos4 750/udp kerberos-iv kdc # Kerberos (server) udp -kerberos4 750/tcp kerberos-iv kdc # Kerberos (server) tcp -kerberos_master 751/udp # Kerberos authentication -kerberos_master 751/tcp # Kerberos authentication -passwd_server 752/udp # Kerberos passwd server -krb_prop 754/tcp # Kerberos slave propagation -krbupdate 760/tcp kreg # Kerberos registration -kpasswd 761/tcp kpwd # Kerberos "passwd" -kpop 1109/tcp # Pop with Kerberos -knetd 2053/tcp # Kerberos de-multiplexor -zephyr-srv 2102/udp # Zephyr server -zephyr-clt 2103/udp # Zephyr serv-hm connection -zephyr-hm 2104/udp # Zephyr hostmanager -eklogin 2105/tcp # Kerberos encrypted rlogin -# -# Unofficial but necessary (for NetBSD) services -# -supfilesrv 871/tcp # SUP server -supfiledbg 1127/tcp # SUP debugging -# -# Datagram Delivery Protocol services -# -rtmp 1/ddp # Routing Table Maintenance Protocol -nbp 2/ddp # Name Binding Protocol -echo 4/ddp # AppleTalk Echo Protocol -zip 6/ddp # Zone Information Protocol -# -# Services added for the Debian GNU/Linux distribution -# -linuxconf 98/tcp # LinuxConf -poppassd 106/tcp # Eudora -poppassd 106/udp # Eudora -ssmtp 465/tcp # SMTP over SSL -moira_db 775/tcp # Moira database -moira_update 777/tcp # Moira update protocol. -moira_ureg 779/udp # Moira user registration. -omirr 808/tcp omirrd # online mirror -omirr 808/udp omirrd # online mirror -swat 901/tcp # Samba configuration tool -skkserv 1178/tcp # skk jisho server port -rmtcfg 1236/tcp # Gracilis Packeten remote config server -xtel 1313/tcp # french minitel -support 1529/tcp # GNATS -cfinger 2003/tcp # GNU Finger -ninstall 2150/tcp # ninstall service -ninstall 2150/udp # ninstall service -afbackup 2988/tcp # Afbackup system -afbackup 2988/udp # Afbackup system -fax 4557/tcp # FAX transmission service (old) -hylafax 4559/tcp # HylaFAX client-server protocol (new) -noclog 5354/tcp # noclogd with TCP (nocol) -noclog 5354/udp # noclogd with UDP (nocol) -hostmon 5355/tcp # hostmon uses TCP (nocol) -hostmon 5355/udp # hostmon uses TCP (nocol) -postgres 5432/tcp # POSTGRES -postgres 5432/udp # POSTGRES -canna 5680/tcp # cannaserver -saned 6566/tcp # SANE network scanner daemon -ircd 6667/tcp # Internet Relay Chat -ircd 6667/udp # Internet Relay Chat -webcache 8080/tcp # WWW caching service -webcache 8080/udp # WWW caching service -tproxy 8081/tcp # Transparent Proxy -tproxy 8081/udp # Transparent Proxy -mandelspawn 9359/udp mandelbrot # network mandelbrot -amanda 10080/udp # amanda backup services -kamanda 10081/tcp # amanda backup services (Kerberos) -kamanda 10081/udp # amanda backup services (Kerberos) -amandaidx 10082/tcp # amanda backup services -amidxtape 10083/tcp # amanda backup services -isdnlog 20011/tcp # isdn logging system -isdnlog 20011/udp # isdn logging system -vboxd 20012/tcp # voice box system -vboxd 20012/udp # voice box system -binkp 24554/tcp # Binkley -binkp 24554/udp # Binkley -asp 27374/tcp # Address Search Protocol -asp 27374/udp # Address Search Protocol -tfido 60177/tcp # Ifmail -tfido 60177/udp # Ifmail -fido 60179/tcp # Ifmail -fido 60179/udp # Ifmail - -# Local services - -sensor 7000/tcp -psoap 7002/tcp diff --git a/sys-apps/bootdisk/files/etc/shadow b/sys-apps/bootdisk/files/etc/shadow deleted file mode 100644 index c005f22ba224..000000000000 --- a/sys-apps/bootdisk/files/etc/shadow +++ /dev/null @@ -1,8 +0,0 @@ -root:$1$0.2LrRji$F6FyQSnoqRFz/3kzogleL/:10770:0::::: -halt:*:9797:0::::: -operator:*:9797:0::::: -shutdown:*:9797:0::::: -sync:*:9797:0::::: -bin:*:9797:0::::: -daemon:*:9797:0::::: -adm:*:9797:0::::: diff --git a/sys-apps/bootdisk/files/initdisk.gz b/sys-apps/bootdisk/files/initdisk.gz Binary files differdeleted file mode 100644 index cbfc763af197..000000000000 --- a/sys-apps/bootdisk/files/initdisk.gz +++ /dev/null diff --git a/sys-apps/bootdisk/files/linuxrc b/sys-apps/bootdisk/files/linuxrc Binary files differdeleted file mode 100755 index 8d32db30c496..000000000000 --- a/sys-apps/bootdisk/files/linuxrc +++ /dev/null diff --git a/sys-apps/bootdisk/files/linuxrc.c b/sys-apps/bootdisk/files/linuxrc.c deleted file mode 100644 index 1964f5a4ddb2..000000000000 --- a/sys-apps/bootdisk/files/linuxrc.c +++ /dev/null @@ -1,188 +0,0 @@ -#include <stdio.h> - -#include <stdio.h> -#include <string.h> -#include <ctype.h> -#include <fcntl.h> -#include <unistd.h> -#include <getopt.h> -#include <errno.h> -#include <sys/ioctl.h> -#include <linux/fs.h> -#include <linux/loop.h> - -#define NUMDRIVES (6) - -char *blurb=" Gentoo Linux CD mounter - Copyright 1999-2001 Gentoo Technologies, Inc. "; -char *color="\033[36;01m"; -char *off="\033[0m"; -char readbuf[80]; - -/*drobbins notes (11 Dec 2000) - device=(major*256)+minor - mount /proc - turn off module ickyness - echo "0 0 0 0" > /proc/sys/kernel/printk - use this info to set the new root fs - echo 0x902>/proc/sys/kernel/real-root-dev - umount /proc -*/ -/* achim notes (14 Dec 2000) - replaced getchar with fgetc - modifyed mount to work with diet-libc -*/ -int set_loop(const char *device, const char *file, int offset, int loopro) -{ - struct loop_info loopinfo; - int fd, ffd, mode, i; - char *pass; - - mode = loopro ? O_RDONLY : O_RDWR; - if ((ffd = open (file, mode)) < 0 && !loopro - && (errno != EROFS || (ffd = open (file, mode = O_RDONLY)) < 0)) { - perror (file); - return 0; - } - if ((fd = open (device, mode)) < 0) { - perror (device); - return 0; - } - loopro = (mode == O_RDONLY); - - memset(&loopinfo, 0, sizeof(loopinfo)); - strncpy(loopinfo.lo_name, file, LO_NAME_SIZE); - loopinfo.lo_name[LO_NAME_SIZE-1] = 0; - loopinfo.lo_offset = offset; - loopinfo.lo_encrypt_key_size = 0; - if (ioctl(fd, LOOP_SET_FD, ffd) < 0) { - perror("ioctl: LOOP_SET_FD"); - exit(1); - } - if (ioctl(fd, LOOP_SET_STATUS, &loopinfo) < 0) { - (void) ioctl(fd, LOOP_CLR_FD, 0); - perror("ioctl: LOOP_SET_STATUS"); - exit(1); - } - close(fd); - close(ffd); - return 1; -} - -//does a mount and performs some error checking/debugging too -//2=success; 1=no media; 0=failure -int domount(const char *dev, - const char *loc, - const char *fstype, - unsigned long flags, - const void *data) -{ - int result; - result=mount(dev,loc,fstype,0,flags,data); - if (result==-1) { - if (errno==ENOMEDIUM) { - printf("Media not found in %s\n",dev); - return 1; - } - printf("Error mounting %s at %s of type %s:\n",dev,loc,fstype); - perror("mount"); - return 0; - } - return 2; -} - -//writes data to a file and performs some error checking -//1=success; 0=failure -int writefile(const char *myfile, char *mystring) { - FILE *myf; - int result; - myf=fopen(myfile,"w"); - if (myf==NULL) { - printf("Error opening file %s: errno %d\n",myfile,errno); - perror("fopen"); - return 0; - } - fwrite(mystring,1,strlen(mystring),myf); - fclose(myf); - return 1; -} - - -int getspace(char *dev) { - char mychar,dummy; - printf("\n1) Try %s again\n2) Continue looking\n\n%s> %s",dev,color,off); - mychar=fgetc(stdin); - dummy=fgetc(stdin); // return - if (mychar=='1') - return 1; - return 0; -} -int main(void) { - char *drives[]={ "/dev/hdc","/dev/hdd","/dev/hdb","/dev/hda","/dev/scd0","/dev/scd1"}; - int i,mresult; - char mychar; - FILE *distfile; - printf("\033c\n\0337\033[01;23r\033[24;01f\033[01;44;32m%s\033[0m\0338\033[A",blurb); - //printf("\nRemounting root fs read-write...\n"); - //should be rw anyway but it's not? - //domount("/dev/ram0","/","ext2",MS_MGC_VAL|MS_REMOUNT,NULL); - printf("%sLet's begin...%s\n\n",color,off); - printf("%sMounting /proc...%s\n",color,off); - //mount /proc filesystem - domount("proc","/proc","proc",MS_MGC_VAL|MS_NOEXEC,NULL); - //turn off kernel logging to console - writefile("/proc/sys/kernel/printk","0 0 0 0"); - - i=0; - while ( 1 ) { - printf("Trying %s...",drives[i]); - sleep(1); - mresult=domount(drives[i],"/distcd","iso9660",MS_MGC_VAL|MS_RDONLY,NULL); - if (mresult==2) { - //a CD of some kind was found - printf("\n%sCD found...%s\n",color,off); - if ((distfile=fopen("/distcd/version","r"))==NULL) { - printf("%sThis does not appear to be the Gentoo Linux distribution disc.%s\n",color,off); - umount(drives[i]); - if (!getspace(drives[i])) - i++; - if (i>NUMDRIVES) - i=0; - continue; - } else { - fclose(distfile); - break; - //success! - } - } else if (mresult==1) { - if (!getspace(drives[i])) - i++; - if (i>NUMDRIVES) - i=0; - continue; - } else { - i++; - if (i>NUMDRIVES) - i=0; - } - } - printf("%sAssociating loopback CD-ROM filesystem...%s\n",color,off); - if(!(set_loop("/dev/loop0","/distcd/images/boot.img",0,0))) { - printf("%sError associating loopback CD-ROM filesystem. This program is stuck!%s\n",color,off); - exit(1); - } - - printf("%sSuccess!%s\n",color,off); -// The kernel will mount the new root filesystem. We just set real-root-dev -// unmount proc and exit -- drobbins -// mount("/dev/loop0","/","ext2",0,MS_MGC_VAL|MS_RDONLY,0); - - //set real root device to /dev/loop0 (major 7, minor 0) - writefile("/proc/sys/kernel/real-root-dev","0x700"); - - //umount /proc - umount("proc"); - - //turn bottom bar off - printf("\0337\033[r\033[24;01f\033[K\0338"); -} - diff --git a/sys-apps/bootdisk/files/linuxrc2.c b/sys-apps/bootdisk/files/linuxrc2.c deleted file mode 100644 index 8f315c447215..000000000000 --- a/sys-apps/bootdisk/files/linuxrc2.c +++ /dev/null @@ -1,183 +0,0 @@ -#include <stdio.h> - -#include <stdio.h> -#include <string.h> -#include <ctype.h> -#include <fcntl.h> -#include <unistd.h> -#include <getopt.h> -#include <errno.h> -#include <sys/ioctl.h> -#include <linux/fs.h> -#include <linux/loop.h> - -#define NUMDRIVES (6) - -char *blurb=" Gentoo Linux CD mounter - Copyright 1999-2001 Gentoo Technologies, Inc. "; -char *color="\033[36;01m"; -char *off="\033[0m"; -char readbuf[80]; - -/*drobbins notes (11 Dec 2000) - device=(major*256)+minor - mount /proc - turn off module ickyness - echo "0 0 0 0" > /proc/sys/kernel/printk - use this info to set the new root fs - echo 0x902>/proc/sys/kernel/real-root-dev - umount /proc -*/ -int set_loop(const char *device, const char *file, int offset, int loopro) -{ - struct loop_info loopinfo; - int fd, ffd, mode, i; - char *pass; - - mode = loopro ? O_RDONLY : O_RDWR; - if ((ffd = open (file, mode)) < 0 && !loopro - && (errno != EROFS || (ffd = open (file, mode = O_RDONLY)) < 0)) { - perror (file); - return 0; - } - if ((fd = open (device, mode)) < 0) { - perror (device); - return 0; - } - loopro = (mode == O_RDONLY); - - memset(&loopinfo, 0, sizeof(loopinfo)); - strncpy(loopinfo.lo_name, file, LO_NAME_SIZE); - loopinfo.lo_name[LO_NAME_SIZE-1] = 0; - loopinfo.lo_offset = offset; - loopinfo.lo_encrypt_key_size = 0; - if (ioctl(fd, LOOP_SET_FD, ffd) < 0) { - perror("ioctl: LOOP_SET_FD"); - exit(1); - } - if (ioctl(fd, LOOP_SET_STATUS, &loopinfo) < 0) { - (void) ioctl(fd, LOOP_CLR_FD, 0); - perror("ioctl: LOOP_SET_STATUS"); - exit(1); - } - close(fd); - close(ffd); - return 1; -} - -//does a mount and performs some error checking/debugging too -//2=success; 1=no media; 0=failure -int domount(const char *dev, - const char *loc, - const char *fstype, - unsigned long flags, - const void *data) -{ - int result; - result=mount(dev,loc,fstype,0,flags,data); - if (result==-1) { - if (errno==ENOMEDIUM) { - printf("Media not found in %s\n",dev); - return 1; - } - printf("Error mounting %s at %s of type %s:\n",dev,loc,fstype); - perror("mount"); - return 0; - } - return 2; -} - -//writes data to a file and performs some error checking -//1=success; 0=failure -int writefile(const char *myfile, char *mystring) { - FILE *myf; - int result; - myf=fopen(myfile,"w"); - if (myf==NULL) { - printf("Error opening file %s: errno %d\n",myfile,errno); - perror("fopen"); - return 0; - } - fwrite(mystring,1,strlen(mystring),myf); - fclose(myf); - return 1; -} - - -int getspace(char *dev) { - char mychar; - printf("\n1) Try %s again\n2) Continue looking\n\n%s> %s",dev,color,off); - mychar=fgetc(stdin); - if (mychar=='1') - return 1; - return 0; -} -int main(void) { - char *drives[]={ "/dev/hdc","/dev/hdd","/dev/hdb2","/dev/hda","/dev/scd0","/dev/scd1"}; - int i,mresult; - char mychar; - FILE *distfile; -// printf("\n\0337\033[01;23r\033[24;01f\033[01;44;32m%s\033[0m\0338\033[A",blurb); - //printf("\nRemounting root fs read-write...\n"); - //should be rw anyway but it's not? - //domount("/dev/ram0","/","ext2",MS_MGC_VAL|MS_REMOUNT,NULL); - printf("%sLet's begin...%s\n\n",color,off); -// printf("%sMounting /proc...%s\n",color,off); - //mount /proc filesystem -// domount("proc","/proc","proc",MS_MGC_VAL|MS_NOEXEC,NULL); - //turn off kernel logging to console -// writefile("/proc/sys/kernel/printk","0 0 0 0"); - - i=0; - while ( 1 ) { - printf("Trying %s...",drives[i]); - sleep(1); - mresult=domount(drives[i],"/distcd","reiserfs",MS_MGC_VAL|MS_RDONLY,NULL); - if (mresult==2) { - //a CD of some kind was found - printf("\n%sCD found...%s\n",color,off); - if ((distfile=fopen("/distcd/version","r"))==NULL) { - printf("%sThis does not appear to be the Gentoo Linux distribution disc.%s\n",color,off); - umount(drives[i]); - if (!getspace(drives[i])) - i++; - if (i>NUMDRIVES) - i=0; - continue; - } else { - fclose(distfile); - break; - //success! - } - } else if (mresult==1) { - if (!getspace(drives[i])) - i++; - if (i>NUMDRIVES) - i=0; - continue; - } else { - i++; - if (i>NUMDRIVES) - i=0; - } - } - printf("%sAssociating loopback CD-ROM filesystem...%s\n",color,off); - if(!(set_loop("/dev/loop0","/distcd/images/boot.img",0,0))) { - printf("%sError associating loopback CD-ROM filesystem. This program is stuck!%s\n",color,off); - exit(1); - } - - printf("%sSuccess!%s\n",color,off); -// drobbins is certain that this line should not be here -// the kernel should mount the new root filesystem -// mount("/dev/loop0","/mnt/cdrom","ext2",0,MS_MGC_VAL|MS_RDONLY,0); - - //set real root device to /dev/loop0 (major 7, minor 0) -// writefile("/proc/sys/kernel/real-root-dev","0x700"); - - //umount /proc -// umount("proc"); - - //turn bottom bar off -// printf("\0337\033[r\033[24;01f\033[K\0338"); -} - diff --git a/sys-apps/bootdisk/files/linuxrc4.c b/sys-apps/bootdisk/files/linuxrc4.c deleted file mode 100644 index dbd2da40b232..000000000000 --- a/sys-apps/bootdisk/files/linuxrc4.c +++ /dev/null @@ -1,185 +0,0 @@ -#include <stdio.h> - -#include <stdio.h> -#include <string.h> -#include <ctype.h> -#include <fcntl.h> -#include <unistd.h> -#include <getopt.h> -#include <errno.h> -#include <sys/ioctl.h> -#include <linux/fs.h> -#include <linux/loop.h> - -#define NUMDRIVES (6) - -char *blurb=" Gentoo Linux CD mounter - Copyright 1999-2001 Gentoo Technologies, Inc. "; -char *color="\033[36;01m"; -char *off="\033[0m"; -char readbuf[80]; - -/*drobbins notes (11 Dec 2000) - device=(major*256)+minor - mount /proc - turn off module ickyness - echo "0 0 0 0" > /proc/sys/kernel/printk - use this info to set the new root fs - echo 0x902>/proc/sys/kernel/real-root-dev - umount /proc -*/ -/* achim notes (14 Dec 2000) - replaced getchar with fgetc - modifyed mount to work with diet-libc -*/ -int set_loop(const char *device, const char *file, int offset, int loopro) -{ - struct loop_info loopinfo; - int fd, ffd, mode, i; - char *pass; - - mode = loopro ? O_RDONLY : O_RDWR; - if ((ffd = open (file, mode)) < 0 && !loopro - && (errno != EROFS || (ffd = open (file, mode = O_RDONLY)) < 0)) { - perror (file); - return 0; - } - if ((fd = open (device, mode)) < 0) { - perror (device); - return 0; - } - loopro = (mode == O_RDONLY); - - memset(&loopinfo, 0, sizeof(loopinfo)); - strncpy(loopinfo.lo_name, file, LO_NAME_SIZE); - loopinfo.lo_name[LO_NAME_SIZE-1] = 0; - loopinfo.lo_offset = offset; - loopinfo.lo_encrypt_key_size = 0; - if (ioctl(fd, LOOP_SET_FD, ffd) < 0) { - perror("ioctl: LOOP_SET_FD"); - exit(1); - } - if (ioctl(fd, LOOP_SET_STATUS, &loopinfo) < 0) { - (void) ioctl(fd, LOOP_CLR_FD, 0); - perror("ioctl: LOOP_SET_STATUS"); - exit(1); - } - close(fd); - close(ffd); - return 1; -} - -//does a mount and performs some error checking/debugging too -//2=success; 1=no media; 0=failure -int domount(const char *dev, - const char *loc, - const char *fstype, - unsigned long flags, - const void *data) -{ - int result; - result=mount(dev,loc,fstype,0,flags,data); - if (result==-1) { - if (errno==ENOMEDIUM) { - printf("Media not found in %s\n",dev); - return 1; - } - printf("Error mounting %s at %s of type %s:\n",dev,loc,fstype); - perror("mount"); - return 0; - } - return 2; -} - -//writes data to a file and performs some error checking -//1=success; 0=failure -int writefile(const char *myfile, char *mystring) { - FILE *myf; - int result; - myf=fopen(myfile,"w"); - if (myf==NULL) { - printf("Error opening file %s: errno %d\n",myfile,errno); - perror("fopen"); - return 0; - } - fwrite(mystring,1,strlen(mystring),myf); - fclose(myf); - return 1; -} - - -int getspace(char *dev) { - char mychar,dummy; - printf("\n1) Try %s again\n2) Continue looking\n\n%s> %s",dev,color,off); - mychar=fgetc(stdin); - dummy=fgetc(stdin); // return - if (mychar=='1') - return 1; - return 0; -} -int main(void) { - char *drives[]={ "/dev/hdc","/dev/hdd","/dev/hdb","/dev/hda","/dev/scd0","/dev/scd1"}; - int i,mresult; - char mychar; - FILE *distfile; - printf("\033c\n\0337\033[01;23r\033[24;01f\033[01;44;32m%s\033[0m\0338\033[A",blurb); - printf("\nRemounting root fs read-write...\n"); - //should be rw anyway but it's not? - domount("/dev/ram0","/","ext2",MS_MGC_VAL|MS_REMOUNT,NULL); - printf("%sLet's begin...%s\n\n",color,off); - printf("%sMounting /proc...%s\n",color,off); - //mount /proc filesystem - domount("proc","/proc","proc",MS_MGC_VAL|MS_NOEXEC,NULL); - //turn off kernel logging to console - writefile("/proc/sys/kernel/printk","0 0 0 0"); - - i=0; - while ( 1 ) { - printf("Trying %s...",drives[i]); - sleep(1); - mresult=domount(drives[i],"/distcd","iso9660",MS_MGC_VAL|MS_RDONLY,NULL); - if (mresult==2) { - //a CD of some kind was found - printf("\n%sCD found...%s\n",color,off); - if ((distfile=fopen("/distcd/version","r"))==NULL) { - printf("%sThis does not appear to be the Gentoo Linux distribution disc.%s\n",color,off); - umount(drives[i]); - if (!getspace(drives[i])) - i++; - if (i>NUMDRIVES) - i=0; - continue; - } else { - fclose(distfile); - break; - //success! - } - } else if (mresult==1) { - if (!getspace(drives[i])) - i++; - if (i>NUMDRIVES) - i=0; - continue; - } else { - i++; - if (i>NUMDRIVES) - i=0; - } - } - printf("%sAssociating loopback CD-ROM filesystem...%s\n",color,off); - if(!(set_loop("/dev/loop0","/distcd/images/boot.img",0,0))) { - printf("%sError associating loopback CD-ROM filesystem. This program is stuck!%s\n",color,off); - exit(1); - } - - printf("%sSuccess!%s\n",color,off); - mount("/dev/loop0","/","ext2",0,MS_MGC_VAL|MS_RDONLY,0); - printf("%sSuccess /dev/loop0!%s\n",color,off); - //set real root device to /dev/loop0 (major 7, minor 0) - writefile("/proc/sys/kernel/real-root-dev","0x700"); - printf("%sRoot changed ...%s\n",color,off); - //umount /proc - umount("proc"); - //turn bottom bar off - printf("\0337\033[r\033[24;01f\033[K\0338"); -} - diff --git a/sys-apps/bootdisk/files/linuxrc5.c b/sys-apps/bootdisk/files/linuxrc5.c deleted file mode 100644 index cfa48ade05a0..000000000000 --- a/sys-apps/bootdisk/files/linuxrc5.c +++ /dev/null @@ -1,186 +0,0 @@ -#include <stdio.h> - -#include <stdio.h> -#include <string.h> -#include <ctype.h> -#include <fcntl.h> -#include <unistd.h> -#include <getopt.h> -#include <errno.h> -#include <sys/ioctl.h> -#include <linux/fs.h> -#include <linux/loop.h> - -#define NUMDRIVES (6) - -char *blurb=" Gentoo Linux CD mounter - Copyright 1999-2001 Gentoo Technologies, Inc. "; -char *color="\033[36;01m"; -char *off="\033[0m"; -char readbuf[80]; - -/*drobbins notes (11 Dec 2000) - device=(major*256)+minor - mount /proc - turn off module ickyness - echo "0 0 0 0" > /proc/sys/kernel/printk - use this info to set the new root fs - echo 0x902>/proc/sys/kernel/real-root-dev - umount /proc -*/ -/* achim notes (14 Dec 2000) - replaced getchar with fgetc - modifyed mount to work with diet-libc -*/ -int set_loop(const char *device, const char *file, int offset, int loopro) -{ - struct loop_info loopinfo; - int fd, ffd, mode, i; - char *pass; - - mode = loopro ? O_RDONLY : O_RDWR; - if ((ffd = open (file, mode)) < 0 && !loopro - && (errno != EROFS || (ffd = open (file, mode = O_RDONLY)) < 0)) { - perror (file); - return 0; - } - if ((fd = open (device, mode)) < 0) { - perror (device); - return 0; - } - loopro = (mode == O_RDONLY); - - memset(&loopinfo, 0, sizeof(loopinfo)); - strncpy(loopinfo.lo_name, file, LO_NAME_SIZE); - loopinfo.lo_name[LO_NAME_SIZE-1] = 0; - loopinfo.lo_offset = offset; - loopinfo.lo_encrypt_key_size = 0; - if (ioctl(fd, LOOP_SET_FD, ffd) < 0) { - perror("ioctl: LOOP_SET_FD"); - exit(1); - } - if (ioctl(fd, LOOP_SET_STATUS, &loopinfo) < 0) { - (void) ioctl(fd, LOOP_CLR_FD, 0); - perror("ioctl: LOOP_SET_STATUS"); - exit(1); - } - close(fd); - close(ffd); - return 1; -} - -//does a mount and performs some error checking/debugging too -//2=success; 1=no media; 0=failure -int domount(const char *dev, - const char *loc, - const char *fstype, - unsigned long flags, - const void *data) -{ - int result; - result=mount(dev,loc,fstype,0,flags,data); - if (result==-1) { - if (errno==ENOMEDIUM) { - printf("Media not found in %s\n",dev); - return 1; - } - printf("Error mounting %s at %s of type %s:\n",dev,loc,fstype); - perror("mount"); - return 0; - } - return 2; -} - -//writes data to a file and performs some error checking -//1=success; 0=failure -int writefile(const char *myfile, char *mystring) { - FILE *myf; - int result; - myf=fopen(myfile,"w"); - if (myf==NULL) { - printf("Error opening file %s: errno %d\n",myfile,errno); - perror("fopen"); - return 0; - } - fwrite(mystring,1,strlen(mystring),myf); - fclose(myf); - return 1; -} - - -int getspace(char *dev) { - char mychar,dummy; - printf("\n1) Try %s again\n2) Continue looking\n\n%s> %s",dev,color,off); - mychar=fgetc(stdin); - dummy=fgetc(stdin); // return - if (mychar=='1') - return 1; - return 0; -} -int main(void) { - char *drives[]={ "/dev/hdc","/dev/hdd","/dev/hdb","/dev/hda","/dev/scd0","/dev/scd1"}; - int i,mresult; - char mychar; - FILE *distfile; - printf("\033c\n\0337\033[01;23r\033[24;01f\033[01;44;32m%s\033[0m\0338\033[A",blurb); - printf("\nRemounting root fs read-write...\n"); - //should be rw anyway but it's not? - domount("/dev/ram0","/","ext2",MS_MGC_VAL|MS_REMOUNT,NULL); - printf("%sLet's begin...%s\n\n",color,off); - printf("%sMounting /proc...%s\n",color,off); - //mount /proc filesystem - domount("proc","/proc","proc",MS_MGC_VAL|MS_NOEXEC,NULL); - //turn off kernel logging to console - writefile("/proc/sys/kernel/printk","0 0 0 0"); - - i=0; - while ( 1 ) { - printf("Trying %s...",drives[i]); - sleep(1); - mresult=domount(drives[i],"/distcd","iso9660",MS_MGC_VAL|MS_RDONLY,NULL); - if (mresult==2) { - //a CD of some kind was found - printf("\n%sCD found...%s\n",color,off); - if ((distfile=fopen("/distcd/version","r"))==NULL) { - printf("%sThis does not appear to be the Gentoo Linux distribution disc.%s\n",color,off); - umount(drives[i]); - if (!getspace(drives[i])) - i++; - if (i>NUMDRIVES) - i=0; - continue; - } else { - fclose(distfile); - break; - //success! - } - } else if (mresult==1) { - if (!getspace(drives[i])) - i++; - if (i>NUMDRIVES) - i=0; - continue; - } else { - i++; - if (i>NUMDRIVES) - i=0; - } - } - printf("%sAssociating loopback CD-ROM filesystem...%s\n",color,off); - if(!(set_loop("/dev/loop0","/distcd/images/boot.img",0,0))) { - printf("%sError associating loopback CD-ROM filesystem. This program is stuck!%s\n",color,off); - exit(1); - } - - printf("%sSuccess!%s\n",color,off); - mount("/dev/loop0","/","ext2",0,MS_MGC_VAL|MS_RDONLY,0); - printf("%sSuccess /dev/loop0!%s\n",color,off); - //set real root device to /dev/loop0 (major 7, minor 0) - writefile("/proc/sys/kernel/real-root-dev","0x700"); - printf("%sRoot changed ...%s\n",color,off); - //umount /proc - umount("proc"); - printf("\0337\033[r\033[24;01f\033[K\0338"); -} - - - diff --git a/sys-apps/bootdisk/files/linuxrc6.c b/sys-apps/bootdisk/files/linuxrc6.c deleted file mode 100644 index 324263e37438..000000000000 --- a/sys-apps/bootdisk/files/linuxrc6.c +++ /dev/null @@ -1,187 +0,0 @@ -#include <stdio.h> - -#include <stdio.h> -#include <string.h> -#include <ctype.h> -#include <fcntl.h> -#include <unistd.h> -#include <getopt.h> -#include <errno.h> -#include <sys/ioctl.h> -#include <linux/fs.h> -#include <linux/loop.h> - -#define NUMDRIVES (5) - -char *blurb=" Gentoo Linux CD mounter - Copyright 1999-2001 Gentoo Technologies, Inc. "; -char *color="\033[36;01m"; -char *off="\033[0m"; -char readbuf[80]; - -/*drobbins notes (11 Dec 2000) - device=(major*256)+minor - mount /proc - turn off module ickyness - echo "0 0 0 0" > /proc/sys/kernel/printk - use this info to set the new root fs - echo 0x902>/proc/sys/kernel/real-root-dev - umount /proc -*/ -/* achim notes (14 Dec 2000) - replaced getchar with fgetc - modifyed mount to work with diet-libc -*/ -int set_loop(const char *device, const char *file, int offset, int loopro) -{ - struct loop_info loopinfo; - int fd, ffd, mode, i; - char *pass; - - mode = loopro ? O_RDONLY : O_RDWR; - if ((ffd = open (file, mode)) < 0 && !loopro - && (errno != EROFS || (ffd = open (file, mode = O_RDONLY)) < 0)) { - perror (file); - return 0; - } - if ((fd = open (device, mode)) < 0) { - perror (device); - return 0; - } - loopro = (mode == O_RDONLY); - - memset(&loopinfo, 0, sizeof(loopinfo)); - strncpy(loopinfo.lo_name, file, LO_NAME_SIZE); - loopinfo.lo_name[LO_NAME_SIZE-1] = 0; - loopinfo.lo_offset = offset; - loopinfo.lo_encrypt_key_size = 0; - if (ioctl(fd, LOOP_SET_FD, ffd) < 0) { - perror("ioctl: LOOP_SET_FD"); - exit(1); - } - if (ioctl(fd, LOOP_SET_STATUS, &loopinfo) < 0) { - (void) ioctl(fd, LOOP_CLR_FD, 0); - perror("ioctl: LOOP_SET_STATUS"); - exit(1); - } - close(fd); - close(ffd); - return 1; -} - -//does a mount and performs some error checking/debugging too -//2=success; 1=no media; 0=failure -int domount(const char *dev, - const char *loc, - const char *fstype, - unsigned long flags, - const void *data) -{ - int result; - result=mount(dev,loc,fstype,0,flags,data); - if (result==-1) { - if (errno==ENOMEDIUM) { - printf("Media not found in %s\n",dev); - return 1; - } - printf("Error mounting %s at %s of type %s:\n",dev,loc,fstype); - perror("mount"); - return 0; - } - return 2; -} - -//writes data to a file and performs some error checking -//1=success; 0=failure -int writefile(const char *myfile, char *mystring) { - FILE *myf; - int result; - myf=fopen(myfile,"w"); - if (myf==NULL) { - printf("Error opening file %s: errno %d\n",myfile,errno); - perror("fopen"); - return 0; - } - fwrite(mystring,1,strlen(mystring),myf); - fclose(myf); - return 1; -} - - -int getspace(char *dev) { - char mychar,dummy; - printf("\n1) Try %s again\n2) Continue looking\n\n%s> %s",dev,color,off); - mychar=fgetc(stdin); - dummy=fgetc(stdin); // return - if (mychar=='1') - return 1; - return 0; -} -int main(void) { - char *drives[]={ "/dev/hdc","/dev/hdd","/dev/hdb","/dev/hda","/dev/scd0","/dev/scd1"}; - int i,mresult; - char mychar; - FILE *distfile; - printf("\033c\n\0337\033[01;23r\033[24;01f\033[01;44;32m%s\033[0m\0338\033[A",blurb); - printf("\nRemounting root fs read-write...\n"); - //should be rw anyway but it's not? - domount("/dev/ram0","/","ext2",MS_MGC_VAL|MS_REMOUNT,NULL); - printf("%sLet's begin...%s\n\n",color,off); - printf("%sMounting /proc...%s\n",color,off); - //mount /proc filesystem - domount("proc","/proc","proc",MS_MGC_VAL|MS_NOEXEC,NULL); - //turn off kernel logging to console - writefile("/proc/sys/kernel/printk","0 0 0 0"); - - i=0; - while ( 1 ) { - printf("Trying %s...",drives[i]); - sleep(1); - mresult=domount(drives[i],"/distcd","iso9660",MS_MGC_VAL|MS_RDONLY,NULL); - if (mresult==2) { - //a CD of some kind was found - printf("\n%sCD found...%s\n",color,off); - if ((distfile=fopen("/distcd/version","r"))==NULL) { - printf("%sThis does not appear to be the Gentoo Linux distribution disc.%s\n",color,off); - umount(drives[i]); - if (!getspace(drives[i])) - i++; - if (i>NUMDRIVES) - i=0; - continue; - } else { - fclose(distfile); - break; - //success! - } - } else if (mresult==1) { - if (!getspace(drives[i])) - i++; - if (i>NUMDRIVES) - i=0; - continue; - } else { - i++; - if (i>NUMDRIVES) - i=0; - } - } - printf("%sAssociating loopback CD-ROM filesystem...%s\n",color,off); - if(!(set_loop("/dev/loop0","/distcd/images/boot.img",0,0))) { - printf("%sError associating loopback CD-ROM filesystem. This program is stuck!%s\n",color,off); - exit(1); - } - - printf("%sSuccess!%s\n",color,off); - mresult=domount("/dev/loop0","/","ext2",MS_MGC_VAL|MS_RDONLY,0); - printf("%sSuccess /dev/loop0!%s\n",color,off); - //set real root device to /dev/loop0 (major 7, minor 0) - writefile("/proc/sys/kernel/real-root-dev","0x700"); - printf("%sRoot changed ...%s\n",color,off); - //umount /proc - umount("proc"); - printf("%sProc unmounted ...%s\n",color,off); - printf("\0337\033[r\033[24;01f\033[K\0338"); -} - - - diff --git a/sys-apps/bootdisk/files/linuxrc7.c b/sys-apps/bootdisk/files/linuxrc7.c deleted file mode 100644 index 0c2975b43f58..000000000000 --- a/sys-apps/bootdisk/files/linuxrc7.c +++ /dev/null @@ -1,188 +0,0 @@ -#include <stdio.h> - -#include <stdio.h> -#include <string.h> -#include <ctype.h> -#include <fcntl.h> -#include <unistd.h> -#include <getopt.h> -#include <errno.h> -#include <sys/ioctl.h> -#include <linux/fs.h> -#include <linux/loop.h> - -#define NUMDRIVES (5) - -char *blurb=" Gentoo Linux CD mounter - Copyright 1999-2001 Gentoo Technologies, Inc. "; -char *color="\033[36;01m"; -char *off="\033[0m"; -char readbuf[80]; - -/*drobbins notes (11 Dec 2000) - device=(major*256)+minor - mount /proc - turn off module ickyness - echo "0 0 0 0" > /proc/sys/kernel/printk - use this info to set the new root fs - echo 0x902>/proc/sys/kernel/real-root-dev - umount /proc -*/ -/* achim notes (14 Dec 2000) - replaced getchar with fgetc - modifyed mount to work with diet-libc -*/ -int set_loop(const char *device, const char *file, int offset, int loopro) -{ - struct loop_info loopinfo; - int fd, ffd, mode, i; - char *pass; - - mode = loopro ? O_RDONLY : O_RDWR; - if ((ffd = open (file, mode)) < 0 && !loopro - && (errno != EROFS || (ffd = open (file, mode = O_RDONLY)) < 0)) { - perror (file); - return 0; - } - if ((fd = open (device, mode)) < 0) { - perror (device); - return 0; - } - loopro = (mode == O_RDONLY); - - memset(&loopinfo, 0, sizeof(loopinfo)); - strncpy(loopinfo.lo_name, file, LO_NAME_SIZE); - loopinfo.lo_name[LO_NAME_SIZE-1] = 0; - loopinfo.lo_offset = offset; - loopinfo.lo_encrypt_key_size = 0; - if (ioctl(fd, LOOP_SET_FD, ffd) < 0) { - perror("ioctl: LOOP_SET_FD"); - exit(1); - } - if (ioctl(fd, LOOP_SET_STATUS, &loopinfo) < 0) { - (void) ioctl(fd, LOOP_CLR_FD, 0); - perror("ioctl: LOOP_SET_STATUS"); - exit(1); - } - close(fd); - close(ffd); - return 1; -} - -//does a mount and performs some error checking/debugging too -//2=success; 1=no media; 0=failure -int domount(const char *dev, - const char *loc, - const char *fstype, - unsigned long flags, - const void *data) -{ - int result; - result=mount(dev,loc,fstype,flags,data); - if (result==-1) { - if (errno==ENOMEDIUM) { - printf("Media not found in %s\n",dev); - return 1; - } - printf("Error mounting %s at %s of type %s:\n",dev,loc,fstype); - perror("mount"); - return 0; - } - return 2; -} - -//writes data to a file and performs some error checking -//1=success; 0=failure -int writefile(const char *myfile, char *mystring) { - FILE *myf; - int result; - myf=fopen(myfile,"w"); - if (myf==NULL) { - printf("Error opening file %s: errno %d\n",myfile,errno); - perror("fopen"); - return 0; - } - fwrite(mystring,1,strlen(mystring),myf); - fclose(myf); - return 1; -} - - -int getspace(char *dev) { - char mychar,dummy; - printf("\n1) Try %s again\n2) Continue looking\n\n%s> %s",dev,color,off); - mychar=fgetc(stdin); - dummy=fgetc(stdin); // return - if (mychar=='1') - return 1; - return 0; -} -int main(void) { - char *drives[]={ "/dev/hdc","/dev/hdd","/dev/hdb","/dev/hda","/dev/scd0","/dev/scd1"}; - int i,mresult; - char mychar; - FILE *distfile; - printf("\033c\n\0337\033[01;23r\033[24;01f\033[01;44;32m%s\033[0m\0338\033[A",blurb); - printf("\nRemounting root fs read-write...\n"); - //should be rw anyway but it's not? - domount("/dev/ram0","/","ext2",MS_MGC_VAL|MS_REMOUNT,NULL); - printf("%sLet's begin...%s\n\n",color,off); - printf("%sMounting /proc...%s\n",color,off); - //mount /proc filesystem - domount("proc","/proc","proc",MS_MGC_VAL|MS_NOEXEC,NULL); - //turn off kernel logging to console - writefile("/proc/sys/kernel/printk","0 0 0 0"); - - i=0; - while ( 1 ) { - printf("Trying %s...",drives[i]); - sleep(1); - mresult=domount(drives[i],"/distcd","iso9660",MS_MGC_VAL|MS_RDONLY,NULL); - if (mresult==2) { - //a CD of some kind was found - printf("\n%sCD found...%s\n",color,off); - if ((distfile=fopen("/distcd/version","r"))==NULL) { - printf("%sThis does not appear to be the Gentoo Linux distribution disc.%s\n",color,off); - umount(drives[i]); - if (!getspace(drives[i])) - i++; - if (i>NUMDRIVES) - i=0; - continue; - } else { - fclose(distfile); - break; - //success! - } - break; - } else if (mresult==1) { - if (!getspace(drives[i])) - i++; - if (i>NUMDRIVES) - i=0; - continue; - } else { - i++; - if (i>NUMDRIVES) - i=0; - } - } - printf("%sAssociating loopback CD-ROM filesystem...%s\n",color,off); - if(!(set_loop("/dev/loop0","/distcd/images/boot.img",0,0))) { - printf("%sError associating loopback CD-ROM filesystem. This program is stuck!%s\n",color,off); - exit(1); - } - - printf("%sSuccess!%s\n",color,off); - mresult=domount("/dev/loop0","/","ext2",MS_MGC_VAL|MS_RDONLY,0); - printf("%sSuccess /dev/loop0!%s\n",color,off); - //set real root device to /dev/loop0 (major 7, minor 0) - writefile("/proc/sys/kernel/real-root-dev","0x700"); - printf("%sRoot changed ...%s\n",color,off); - //umount /proc - umount("proc"); - printf("%sProc unmounted ...%s\n",color,off); - printf("\0337\033[r\033[24;01f\033[K\0338"); -} - - - diff --git a/sys-apps/bootdisk/files/loop.h b/sys-apps/bootdisk/files/loop.h deleted file mode 100644 index f8287319e0c1..000000000000 --- a/sys-apps/bootdisk/files/loop.h +++ /dev/null @@ -1,127 +0,0 @@ -#ifndef _LINUX_LOOP_H -#define _LINUX_LOOP_H - -#include <linux/kdev_t.h> - -/* - * include/linux/loop.h - * - * Written by Theodore Ts'o, 3/29/93. - * - * Copyright 1993 by Theodore Ts'o. Redistribution of this file is - * permitted under the GNU Public License. - */ - -#define LO_NAME_SIZE 64 -#define LO_KEY_SIZE 32 - -#ifdef __KERNEL__ - -struct loop_device { - int lo_number; - struct dentry *lo_dentry; - int lo_refcnt; - kdev_t lo_device; - int lo_offset; - int lo_encrypt_type; - int lo_encrypt_key_size; - int lo_flags; - int (*transfer)(struct loop_device *, int cmd, - char *raw_buf, char *loop_buf, int size, - int real_block); - char lo_name[LO_NAME_SIZE]; - char lo_encrypt_key[LO_KEY_SIZE]; - __u32 lo_init[2]; - uid_t lo_key_owner; /* Who set the key */ - int (*ioctl)(struct loop_device *, int cmd, - unsigned long arg); - - struct file * lo_backing_file; - void *key_data; - char key_reserved[48]; /* for use by the filter modules */ -}; - -typedef int (* transfer_proc_t)(struct loop_device *, int cmd, - char *raw_buf, char *loop_buf, int size, - int real_block); - -#endif /* __KERNEL__ */ - -/* - * Loop flags - */ -#define LO_FLAGS_DO_BMAP 0x00000001 -#define LO_FLAGS_READ_ONLY 0x00000002 - -/* - * Note that this structure gets the wrong offsets when directly used - * from a glibc program, because glibc has a 32bit dev_t. - * Prevent people from shooting in their own foot. - */ - -/* - * This uses kdev_t because glibc currently has no appropiate - * conversion version for the loop ioctls. - * The situation is very unpleasant - */ - -struct loop_info { - int lo_number; /* ioctl r/o */ - dev_t lo_device; /* ioctl r/o */ - unsigned long lo_inode; /* ioctl r/o */ - dev_t lo_rdevice; /* ioctl r/o */ - int lo_offset; - int lo_encrypt_type; - int lo_encrypt_key_size; /* ioctl w/o */ - int lo_flags; /* ioctl r/o */ - char lo_name[LO_NAME_SIZE]; - unsigned char lo_encrypt_key[LO_KEY_SIZE]; /* ioctl w/o */ - unsigned long lo_init[2]; - char reserved[4]; -}; - -/* - * Loop filter types - */ - -#define LO_CRYPT_NONE 0 -#define LO_CRYPT_XOR 1 -#define LO_CRYPT_DES 2 -#define LO_CRYPT_FISH2 3 /* Brand new Twofish encryption */ -#define LO_CRYPT_BLOW 4 -#define LO_CRYPT_CAST128 5 -#define LO_CRYPT_IDEA 6 -#define LO_CRYPT_DUMMY 9 -#define LO_CRYPT_SKIPJACK 10 -#define MAX_LO_CRYPT 20 - -#ifdef __KERNEL__ -/* Support for loadable transfer modules */ -struct loop_func_table { - int number; /* filter type */ - int (*transfer)(struct loop_device *lo, int cmd, - char *raw_buf, char *loop_buf, int size, - int real_block); - int (*init)(struct loop_device *, struct loop_info *); - /* release is called from loop_unregister_transfer or clr_fd */ - int (*release)(struct loop_device *); - int (*ioctl)(struct loop_device *, int cmd, unsigned long arg); - /* lock and unlock manage the module use counts */ - void (*lock)(struct loop_device *); - void (*unlock)(struct loop_device *); -}; - -int loop_register_transfer(struct loop_func_table *funcs); -int loop_unregister_transfer(int number); - -#endif -/* - * IOCTL commands --- we will commandeer 0x4C ('L') - */ - -#define LOOP_SET_FD 0x4C00 -#define LOOP_CLR_FD 0x4C01 -#define LOOP_SET_STATUS 0x4C02 -#define LOOP_GET_STATUS 0x4C03 - -#endif diff --git a/sys-apps/bootdisk/files/makeme.sh b/sys-apps/bootdisk/files/makeme.sh deleted file mode 100755 index b87b5b0a5a3f..000000000000 --- a/sys-apps/bootdisk/files/makeme.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -FILE=linuxrc7 -rm linuxrc $FILE.o -gcc -o $FILE.o -c $FILE.c -I/usr/include/dietlibc && ld -static -o linuxrc $FILE.o /usr/lib/dietlibc.a diff --git a/sys-apps/bootdisk/files/mkcd.sh b/sys-apps/bootdisk/files/mkcd.sh deleted file mode 100755 index 3cb4d1fb7e22..000000000000 --- a/sys-apps/bootdisk/files/mkcd.sh +++ /dev/null @@ -1,334 +0,0 @@ -#!/bin/sh - -export PATH=/usr/lib/portage/bin:${PATH} - - -eval `import-settings PORTDIR PKGDIR PACKAGE PORTAGE_TMPDIR` -export BROOT=${PORTAGE_TMPDIR}/boot -export BOOTIMG=${BROOT}/bootcd -export INITDISK=${BROOT}/initrd -export PORTDIR=$PORTDIR/gentoo-x86 -export BOOTDIR=$PORTDIR/sys-apps/bootdisk -export KERNEL=${PKGDIR}/All/linux-bootdisk-2.4.0_rc10-r7.${PACKAGE} - - -if [ ! -d "${BOOTDIR}" ] -then - echo "Sorry no bootdisk in the cvs tree $PORTDIR !" - exit 1 -fi - -if [ ! -f "${KERNEL}" ] -then - echo "Sorry no kernel-package found in ${KERNEL}!" - exit 1 -fi - - -dodirs() { - for i in $@ - do - mkdir $i - done -} - -doexes() { - for i in $@ - do - cp `which $i` $i - strip $i &>/dev/null - done -} - - -mkbootimg() { - - echo ">>> Creating boot.img" - echo - - cd ${BOOTIMG} - - # *********** 1 ************ - - echo "1. Creating basic dirs" - dodirs bin dev initrd lib sbin usr proc - - # *********** 2 ************ - - echo "2. Creating initdisk stuff in initrd first" - cd ${BOOTIMG}/initrd - dodirs dev distcd etc root tmp var mnt - cd mnt - dodirs floppy gentoo ram boot - ln -sf /initrd/distcd . - cd .. - ln -sf mnt/boot boot - - - - # *********** 4 ************ - - echo "4. Populating /initrd/etc" - cd ${BOOTIMG}/initrd/etc - cp -af ${BOOTDIR}/files/etc.boot/* . - rm -r CVS - touch ld.so.conf - mkdir modules - cp ${BROOT}/kernel/lib/modules/2.4.0-test10/modules.* modules - - # *********** 5 ************ - - echo "5. Creating other dirs for initrd" - cd ${BOOTIMG}/initrd/var - dodirs log run state - mkdir state/nfs - touch log/wtmp - touch run/utmp - - # *********** 6 ************ - - echo "6. Creating links to initrd" - cd ${BOOTIMG} - for i in etc root tmp var mnt - do - ln -s initrd/$i $i - done - - - - # *********** 7 ************ - - echo "7. Creating devices" - cd ${BOOTIMG}/dev - tar xzf ${BOOTDIR}/files/devices.tgz -C . - ln -s ram0 ram - - # *********** 8 ************ - - echo "3. Creating /initrd devices" - cd ${BOOTIMG}/dev - for i in tty tty1 tty2 initrd pts log - do - mv $i ../initrd/dev/$i - ln -sf ../initrd/dev/$i $i - done - - -# Hmm, shutdown needs write access to /dev/initctl -# but symlinking it messes up initrd - - - - # *********** 9 ************ - - echo "9. Populating /bin" - cd ${BOOTIMG}/bin - doexes bash cat chgrp chmod chown cp df du hostname kill ldd ln login \ - ls mkdir mknod mount mv ping ps rm umount uname - ln -s bash sh - - # *********** 10 ************ - - echo "10. Populating /sbin" - cd ${BOOTIMG}/sbin - doexes agetty cfdisk depmod e2fsck fdisk grub halt ifconfig init insmod \ - ldconfig lilo ln lsmod mke2fs mkraid mkreiserfs mkswap portmap \ - raidstart reboot resize2fs reiserfsck \ - route sfdisk shutdown touch tcpd - - # portmap? removed; Ups added again - # reiserfsck and resize_reiserfs does not exist in 2.4 so - # you need the 2.2.18 kernel installed too! - - # Copy kernel binaries - cp -a ${BROOT}/kernel/sbin/* . - cp /sbin/rpc.statd . - ln -s insmod modprobe - ln -s mkraid raid0run - ln -s raidstart raidhotadd - ln -s raidstart raidhotremove - ln -s raidstart raidstop - cp ${PORTDIR}/autoinstaller.sh . - cp ${BOOTDIR}/files/sbin/rc . - - # *********** 11 ************ - - echo "11. Creating /usr dirs" - cd ${BOOTIMG}/usr - dodirs bin lib sbin share - - # *********** 12 ************ - - echo "12. Populating /usr/bin" - cd ${BOOTIMG}/usr/bin - doexes awk bzip2 cut expr fdformat ftp grep gzip joe killall \ - loadkeys most rm rmdir scp sed sleep ssh strace tar top vi wget - - # *********** 13 ************ - - echo "13. Populating /usr/sbin" - cd ${BOOTIMG}/usr/sbin - cp /usr/sbin/rc-update . - cp ${BOOTDIR}/files/sbin/network . - # *********** 14 ************ - - echo "14. Populating /usr/share" - cd ${BOOTIMG}/usr/share - echo " - keymaps" - cp -af /usr/share/keymaps . - echo " - tabset" - cp -af /usr/share/tabset . - echo " - terminfo" - cp -af /usr/share/terminfo . - - # *********** 15 ************ - - echo "15. Populating /usr/lib" - cd ${BOOTIMG}/usr/lib - cp /usr/lib/joerc . - cp /lib/libnss_files.so.2 . - cp /lib/security/pam_permit.so ${BOOTIMG}/lib/pam_permit.so - - # *********** 16 ************ - - echo "16. Finding required libs" - for j in "/bin" "/sbin" "/usr/bin" "/usr/sbin" - do - echo " - $j" - myfiles=`find ${BOOTIMG}$j -print | /usr/lib/portage/bin/find-requires | grep -v "/bin/bash" | grep -v "/bin/sh"` - - for i in $myfiles - do - if [ -f /lib/$i ] - then - cp /lib/$i ${BOOTIMG}/lib/$i - strip ${BOOTIMG}/lib/$i - else - if [ -f /usr/lib/$i ] - then - cp /usr/lib/$i ${BOOTIMG}/usr/lib/$i - strip ${BOOTIMG}/usr/lib/$i &>/dev/null - else - echo "!!! $i not found !" - fi - fi - done - done - ldconfig -r ${BOOTIMG} -f /initrd/etc/ld.so.conf - - # *********** 17 ************ - - echo "17. Copying kernel modules" - cd ${BOOTIMG}/lib - cp -a ${BROOT}/kernel/lib/modules . - cd modules/2.4.0-test10 - rm modules.* - ln -s ../../../initrd/etc/modules/modules.* . - - # *********** 18 ************ - echo - echo "18. boot.img successfully created in ${BOOTIMG}" - echo -} - -mkinitrd() { - - echo ">>> Creating initdisk" - echo - - cd ${INITDISK} - - # *********** 1 ************ - - echo "1. Copying linuxrc" - cp ${PORTDIR}/sys-apps/bootdisk/files/linuxrc . - strip linuxrc - - # *********** 2 ************ - - echo "2. Creating basic dirs" - dodirs dev distcd etc mnt proc root tmp var - - # *********** 3 ************ - - echo "3. Populating /dev" - cd dev - for i in console fd0 fd0u1440 hda hdb hdc hdd hde hdf hdg hdh loop0 ram0 \ - scd0 scd1 scd2 scd3 scd4 scd5 scd6 scd7 log - do - cp -a ${BOOTIMG}/dev/$i . - done - mknod -m 666 tty c 5 0 - mknod -m 600 tty1 c 4 1 - mknod -m 600 tty2 c 4 2 - mknod -m 600 initrd b 1 250 - mkdir pts - # Just for testing - cp -a ${BOOTIMG}/dev/hda2 . - - # *********** 4 ************ - - echo "4. Populating /etc" - cd ../etc - cp -af ${BOOTDIR}/files/etc/* . - mv ${BOOTIMG}/etc/modules . - find . -type d -name "CVS" -exec rm -r {} \; &>/dev/null - cp ${BOOTIMG}/initrd/etc/ld.so.conf . - cp ${BOOTIMG}/initrd/etc/ld.so.cache . - - # *********** 5 ************ - - echo "5. Creating /mnt dirs" - cd ../mnt - dodirs floppy gentoo ram - - # *********** 6 ************ - - echo "6. Populating /var" - cd ../var - cp -a ${BOOTIMG}/var/* . - - # *********** 7 ************ - - echo - echo "7. initrd successfully created in ${INITDISK}" - echo - -} - -if [ -d ${BROOT} ] -then - rm -r ${BROOT} - mkdir ${BROOT} -fi - -cd ${BROOT} - -dodirs ${BOOTIMG} ${INITDISK} kernel mnt -echo ">>> Unpacking kernel package" -echo - -tar xjf ${KERNEL} -C ${BROOT}/kernel || exit 1 - -mkbootimg -mkinitrd - -cd ${BROOT} - -echo ">>> Generating boot.img" -dd if=/dev/zero of=boot.img bs=1024 count=18000 -mke2fs boot.img -mount -o loop ${BROOT}/boot.img ${BROOT}/mnt -cp -af ${BOOTIMG}/* ${BROOT}/mnt -umount ${BROOT}/mnt -echo - -echo ">>> Generating initdisk" -dd if=/dev/zero of=initdisk bs=1024 count=4096 -mke2fs initdisk -mount -o loop ${BROOT}/initdisk ${BROOT}/mnt -cp -af ${INITDISK}/* ${BROOT}/mnt -umount ${BROOT}/mnt -gzip -9 initdisk -echo - diff --git a/sys-apps/bootdisk/files/mkcd3.sh b/sys-apps/bootdisk/files/mkcd3.sh deleted file mode 100755 index 91b423c1489b..000000000000 --- a/sys-apps/bootdisk/files/mkcd3.sh +++ /dev/null @@ -1,336 +0,0 @@ -#!/bin/sh - -export PATH=/usr/lib/portage/bin:${PATH} - - -eval `import-settings PORTDIR PKGDIR PACKAGE PORTAGE_TMPDIR` -export BROOT=${PORTAGE_TMPDIR}/boot -export BOOTIMG=${BROOT}/bootcd -export INITDISK=${BROOT}/initrd -export PORTDIR=$PORTDIR/gentoo-x86 -export BOOTDIR=$PORTDIR/sys-apps/bootdisk -export KERNEL=${PKGDIR}/All/linux-bootdisk-2.4.0_rc10-r7.${PACKAGE} - - -if [ ! -d "${BOOTDIR}" ] -then - echo "Sorry no bootdisk in the cvs tree $PORTDIR !" - exit 1 -fi - -if [ ! -f "${KERNEL}" ] -then - echo "Sorry no kernel-package found in ${KERNEL}!" - exit 1 -fi - - -dodirs() { - for i in $@ - do - mkdir $i - done -} - -doexes() { - for i in $@ - do - cp `which $i` $i - strip $i &>/dev/null - done -} - - -mkbootimg() { - - echo ">>> Creating boot.img" - echo - - cd ${BOOTIMG} - - # *********** 1 ************ - - echo "1. Creating basic dirs" - dodirs bin dev initrd lib sbin usr proc - - # *********** 2 ************ - - echo "2. Creating initdisk stuff in initrd first" - cd ${BOOTIMG}/initrd - dodirs dev distcd etc root tmp var mnt - cd mnt - dodirs floppy gentoo ram boot - ln -sf /initrd/distcd . - cd ../.. - ln -sf mnt/boot boot - - - - # *********** 4 ************ - - echo "4. Populating /initrd/etc" - cd ${BOOTIMG}/initrd/etc - cp -af ${BOOTDIR}/files/etc.boot/* . - rm -r CVS - touch ld.so.conf - mkdir modules - cp ${BROOT}/kernel/lib/modules/2.4.0-test10/modules.* modules - - # *********** 5 ************ - - echo "5. Creating other dirs for initrd" - cd ${BOOTIMG}/initrd/var - dodirs log run state shm - mkdir state/nfs - touch log/wtmp - touch run/utmp - - # *********** 6 ************ - - echo "6. Creating links to initrd" - cd ${BOOTIMG} - for i in etc root tmp var mnt - do - ln -s initrd/$i $i - done - - - - # *********** 7 ************ - - echo "7. Creating devices" - cd ${BOOTIMG}/dev - tar xzf ${BOOTDIR}/files/devices.tgz -C . - ln -s ram0 ram - - - # *********** 3 ************ - - echo "8. Creating /initrd devices" - - cd ${BOOTIMG}/dev - for i in tty tty1 tty2 initrd - do - mv $i ../initrd/dev/$i - ln -sf ../initrd/dev/$i $i - done - ln -sf ../initrd/dev/initctl . - - - # *********** 9 ************ - - echo "9. Populating /bin" - cd ${BOOTIMG}/bin - doexes bash cat cp df du hostname kill ldd ln login loadkeys \ - ls mkdir mount mv ps rm umount uname - ln -s bash sh - - # *********** 10 ************ - - echo "10. Populating /sbin" - cd ${BOOTIMG}/sbin - doexes agetty cfdisk ctrlaltdel depmod e2fsck fdisk grub halt ifconfig init \ - ldconfig lilo ln lsmod mke2fs mkraid mkreiserfs mkswap \ - raidstart reboot resize2fs reiserfsck \ - sfdisk shutdown touch - - # portmap? removed; Ups added again - # reiserfsck and resize_reiserfs does not exist in 2.4 so - # you need the 2.2.18 kernel installed too! - - # Copy kernel binaries - - cp /sbin/rpc.statd . - ln -s insmod modprobe - ln -s mkraid raid0run - ln -s raidstart raidhotadd - ln -s raidstart raidhotremove - ln -s raidstart raidstop - cp ${PORTDIR}/autoinstaller.sh . - cp ${BOOTDIR}/files/sbin/rc . - - # *********** 11 ************ - - echo "11. Creating /usr dirs" - cd ${BOOTIMG}/usr - dodirs bin lib sbin share - - # *********** 12 ************ - - echo "12. Populating /usr/bin" - cd ${BOOTIMG}/usr/bin - doexes awk bzip2 cut chgrp chmod chown expr fdformat ftp grep gzip joe killall \ - most mknod ping rm rmdir scp sed sleep ssh strace tar top vi wget - - # *********** 13 ************ - - echo "13. Populating /usr/sbin" - cd ${BOOTIMG}/usr/sbin - doexes ifconfig portmap route tcpd - cp -a ${BROOT}/kernel/sbin/* . - cp /usr/sbin/rc-update . - cp ${BOOTDIR}/files/sbin/network . - # *********** 14 ************ - - echo "14. Populating /usr/share" - cd ${BOOTIMG}/usr/share - echo " - keymaps" - cp -af /usr/share/keymaps . - echo " - tabset" - cp -af /usr/share/tabset . - echo " - terminfo" - cp -af /usr/share/terminfo . - - # *********** 15 ************ - - echo "15. Populating /usr/lib" - cd ${BOOTIMG}/usr/lib - cp /usr/lib/joerc . - cp /lib/libnss_files.so.2 . - cp /lib/libnss_dns.so.2 . - cp /lib/libresolv.so.2 . - cp /lib/security/pam_permit.so ${BOOTIMG}/lib/pam_permit.so - - # *********** 16 ************ - - echo "16. Finding required libs" - for j in "/bin" "/sbin" "/usr/bin" "/usr/sbin" - do - echo " - $j" - myfiles=`find ${BOOTIMG}$j -print | /usr/lib/portage/bin/find-requires | grep -v "/bin/bash" | grep -v "/bin/sh"` - - for i in $myfiles - do - if [ -f /lib/$i ] - then - cp /lib/$i ${BOOTIMG}/lib/$i - strip ${BOOTIMG}/lib/$i - else - if [ -f /usr/lib/$i ] - then - cp /usr/lib/$i ${BOOTIMG}/usr/lib/$i - strip ${BOOTIMG}/usr/lib/$i &>/dev/null - else - echo "!!! $i not found !" - fi - fi - done - done - ldconfig -r ${BOOTIMG} -f /initrd/etc/ld.so.conf - - # *********** 17 ************ - - echo "17. Copying kernel modules" - cd ${BOOTIMG}/lib - cp -a ${BROOT}/kernel/lib/modules . - cd modules/2.4.0-test10 - rm modules.* - ln -s ../../../initrd/etc/modules/modules.* . - - # *********** 18 ************ - echo - echo "18. boot.img successfully created in ${BOOTIMG}" - echo -} - -mkinitrd() { - - echo ">>> Creating initdisk" - echo - - cd ${INITDISK} - - # *********** 1 ************ - - echo "1. Copying linuxrc" - cp ${PORTDIR}/sys-apps/bootdisk/files/linuxrc . - strip linuxrc - - # *********** 2 ************ - - echo "2. Creating basic dirs" - dodirs dev distcd etc mnt proc root tmp var - - # *********** 3 ************ - - echo "3. Populating /dev" - cd dev - for i in console fd0 fd0u1440 hda hdb hdc hdd hde hdf hdg hdh loop0 ram0 \ - scd0 scd1 scd2 scd3 scd4 scd5 scd6 scd7 initrd - do - cp -a ${BOOTIMG}/dev/$i . - done - mknod -m 666 tty c 5 0 - mknod -m 600 tty1 c 4 1 - mknod -m 600 tty2 c 4 2 - mkfifo -m 600 initctl - mkdir pts - # Just for testing - cp -a ${BOOTIMG}/dev/hda2 . - - # *********** 4 ************ - - echo "4. Populating /etc" - cd ../etc - cp -af ${BOOTDIR}/files/etc/* . - mv ${BOOTIMG}/etc/modules . - find . -type d -name "CVS" -exec rm -r {} \; &>/dev/null - cp ${BOOTIMG}/initrd/etc/ld.so.conf . - cp ${BOOTIMG}/initrd/etc/ld.so.cache . - - # *********** 5 ************ - - echo "5. Creating /mnt dirs" - cd ../mnt - dodirs floppy gentoo ram boot - - # *********** 6 ************ - - echo "6. Populating /var" - cd ../var - cp -a ${BOOTIMG}/var/* . - - # *********** 7 ************ - - echo - echo "7. initrd successfully created in ${INITDISK}" - echo - -} - -if [ -d ${BROOT} ] -then - rm -r ${BROOT} - mkdir ${BROOT} -fi - -cd ${BROOT} - -dodirs ${BOOTIMG} ${INITDISK} kernel mnt -echo ">>> Unpacking kernel package" -echo - -tar xjf ${KERNEL} -C ${BROOT}/kernel || exit 1 - -mkbootimg -mkinitrd - -cd ${BROOT} - -echo ">>> Generating boot.img" -dd if=/dev/zero of=boot.img bs=1024 count=22000 -mke2fs boot.img -mount -o loop ${BROOT}/boot.img ${BROOT}/mnt -cp -af ${BOOTIMG}/* ${BROOT}/mnt -umount ${BROOT}/mnt -echo - -echo ">>> Generating initdisk" -dd if=/dev/zero of=initdisk bs=1024 count=4096 -mke2fs initdisk -mount -o loop ${BROOT}/initdisk ${BROOT}/mnt -cp -af ${INITDISK}/* ${BROOT}/mnt -umount ${BROOT}/mnt -gzip -9 initdisk -echo - diff --git a/sys-apps/bootdisk/files/mkcd4.sh b/sys-apps/bootdisk/files/mkcd4.sh deleted file mode 100755 index c922393fcf1e..000000000000 --- a/sys-apps/bootdisk/files/mkcd4.sh +++ /dev/null @@ -1,339 +0,0 @@ -#!/bin/sh - -export PATH=/usr/lib/portage/bin:${PATH} - - -eval `import-settings PORTDIR PKGDIR PACKAGE PORTAGE_TMPDIR` -export BROOT=${PORTAGE_TMPDIR}/boot -export BOOTIMG=${BROOT}/bootcd -export INITDISK=${BROOT}/initrd -export PORTDIR=$PORTDIR/gentoo-x86 -export BOOTDIR=$PORTDIR/sys-apps/bootdisk -export KERNEL=${PKGDIR}/All/linux-bootdisk-2.4.1_pre8-r1.${PACKAGE} -export KV=2.4.1-pre8 - -if [ ! -d "${BOOTDIR}" ] -then - echo "Sorry no bootdisk in the cvs tree $PORTDIR !" - exit 1 -fi - -if [ ! -f "${KERNEL}" ] -then - echo "Sorry no kernel-package found in ${KERNEL}!" - exit 1 -fi - - -dodirs() { - for i in $@ - do - mkdir $i - done -} - -doexes() { - for i in $@ - do - cp `which $i` $i - strip $i &>/dev/null - done -} - - -mkbootimg() { - - echo ">>> Creating boot.img" - echo - - cd ${BOOTIMG} - - # *********** 1 ************ - - echo "1. Creating basic dirs" - dodirs bin dev initrd lib sbin usr proc - - # *********** 2 ************ - - echo "2. Creating initdisk stuff in initrd first" - cd ${BOOTIMG}/initrd - dodirs dev distcd etc root tmp var mnt - cd mnt - dodirs floppy gentoo ram boot - ln -sf /initrd/distcd . - cd ../.. - ln -sf mnt/boot boot - - - - # *********** 4 ************ - - echo "4. Populating /initrd/etc" - cd ${BOOTIMG}/initrd/etc - cp -af ${BOOTDIR}/files/etc.boot/* . - rm -r CVS - touch ld.so.conf - mkdir modules - cp ${BROOT}/kernel/lib/modules/${KV}/modules.* modules - - # *********** 5 ************ - - echo "5. Creating other dirs for initrd" - cd ${BOOTIMG}/initrd/var - dodirs log run lib shm - mkdir lib/nfs - touch log/wtmp - touch run/utmp - - # *********** 6 ************ - - echo "6. Creating links to initrd" - cd ${BOOTIMG} - for i in etc root tmp var mnt - do - ln -s initrd/$i $i - done - - - - # *********** 7 ************ - - echo "7. Creating devices" - cd ${BOOTIMG}/dev - tar xzf ${BOOTDIR}/files/devices.tgz -C . - ln -s ram0 ram - - - # *********** 3 ************ - - echo "8. Creating /initrd devices" - - cd ${BOOTIMG}/dev - for i in tty tty1 tty2 initrd - do - mv $i ../initrd/dev/$i - ln -sf ../initrd/dev/$i $i - done - ln -sf ../initrd/dev/initctl . - - - # *********** 9 ************ - - echo "9. Populating /bin" - cd ${BOOTIMG}/bin - doexes bash cat cp df du hostname kill ldd ln login loadkeys \ - ls mkdir mount mv ps rm umount uname - ln -s bash sh - - # *********** 10 ************ - - echo "10. Populating /sbin" - cd ${BOOTIMG}/sbin - doexes agetty cfdisk ctrlaltdel depmod e2fsck fdisk grub halt ifconfig init \ - insmod ldconfig lilo ln lsmod mke2fs mkraid mkreiserfs mkswap \ - raidstart reboot resize2fs reiserfsck \ - sfdisk shutdown touch - - # portmap? removed; Ups added again - # reiserfsck and resize_reiserfs does not exist in 2.4 so - # you need the 2.2.18 kernel installed too! - - # Copy kernel binaries - - cp /sbin/rpc.statd . - ln -s insmod modprobe - ln -s insmod rmmod - ln -s mkraid raid0run - ln -s raidstart raidhotadd - ln -s raidstart raidhotremove - ln -s raidstart raidstop - cp ${PORTDIR}/autoinstaller.sh . - cp ${BOOTDIR}/files/sbin/rc . - - # *********** 11 ************ - - echo "11. Creating /usr dirs" - cd ${BOOTIMG}/usr - dodirs bin lib sbin share - - # *********** 12 ************ - - echo "12. Populating /usr/bin" - cd ${BOOTIMG}/usr/bin - doexes awk bzip2 cut chgrp chmod chown chroot expr fdformat ftp grep gzip joe killall \ - most mknod ping rm rmdir scp sed sleep ssh strace tar top vi wget - ln gzip gunzip - ln gzip zcat - # *********** 13 ************ - - echo "13. Populating /usr/sbin" - cd ${BOOTIMG}/usr/sbin - doexes ifconfig portmap route tcpd - cp -a ${BROOT}/kernel/sbin/* . - cp /usr/sbin/rc-update . - cp ${BOOTDIR}/files/sbin/network . - # *********** 14 ************ - - echo "14. Populating /usr/share" - cd ${BOOTIMG}/usr/share - echo " - keymaps" - cp -af /usr/share/keymaps . - echo " - tabset" - cp -af /usr/share/tabset . - echo " - terminfo" - cp -af /usr/share/terminfo . - - # *********** 15 ************ - - echo "15. Populating /usr/lib" - cd ${BOOTIMG}/usr/lib - cp /usr/lib/joerc . - cp /lib/libnss_files.so.2 . - cp /lib/libnss_dns.so.2 . - cp /lib/libresolv.so.2 . - cp /lib/security/pam_permit.so ${BOOTIMG}/lib/pam_permit.so - - # *********** 16 ************ - - echo "16. Finding required libs" - for j in "/bin" "/sbin" "/usr/bin" "/usr/sbin" - do - echo " - $j" - myfiles=`find ${BOOTIMG}$j -print | /usr/lib/portage/bin/find-requires | grep -v "/bin/bash" | grep -v "/bin/sh"` - - for i in $myfiles - do - if [ -f /lib/$i ] - then - cp /lib/$i ${BOOTIMG}/lib/$i - strip ${BOOTIMG}/lib/$i - else - if [ -f /usr/lib/$i ] - then - cp /usr/lib/$i ${BOOTIMG}/usr/lib/$i - strip ${BOOTIMG}/usr/lib/$i &>/dev/null - else - echo "!!! $i not found !" - fi - fi - done - done - ldconfig -r ${BOOTIMG} -f /initrd/etc/ld.so.conf - - # *********** 17 ************ - - echo "17. Copying kernel modules" - cd ${BOOTIMG}/lib - cp -a ${BROOT}/kernel/lib/modules . - cd modules/${KV} - rm modules.* - ln -s ../../../initrd/etc/modules/modules.* . - - # *********** 18 ************ - echo - echo "18. boot.img successfully created in ${BOOTIMG}" - echo -} - -mkinitrd() { - - echo ">>> Creating initdisk" - echo - - cd ${INITDISK} - - # *********** 1 ************ - - echo "1. Copying linuxrc" - cp ${PORTDIR}/sys-apps/bootdisk/files/linuxrc . - strip linuxrc - - # *********** 2 ************ - - echo "2. Creating basic dirs" - dodirs dev distcd etc mnt proc root tmp var - - # *********** 3 ************ - - echo "3. Populating /dev" - cd dev - for i in console fd0 fd0u1440 hda hdb hdc hdd hde hdf hdg hdh loop0 ram0 \ - scd0 scd1 scd2 scd3 scd4 scd5 scd6 scd7 initrd - do - cp -a ${BOOTIMG}/dev/$i . - done - mknod -m 666 tty c 5 0 - mknod -m 600 tty1 c 4 1 - mknod -m 600 tty2 c 4 2 - mkfifo -m 600 initctl - mkdir pts - # Just for testing - cp -a ${BOOTIMG}/dev/hda2 . - - # *********** 4 ************ - - echo "4. Populating /etc" - cd ../etc - cp -af ${BOOTDIR}/files/etc/* . - mv ${BOOTIMG}/etc/modules . - find . -type d -name "CVS" -exec rm -r {} \; &>/dev/null - cp ${BOOTIMG}/initrd/etc/ld.so.conf . - cp ${BOOTIMG}/initrd/etc/ld.so.cache . - - # *********** 5 ************ - - echo "5. Creating /mnt dirs" - cd ../mnt - dodirs floppy gentoo ram boot - ln -sf /initrd/distcd distcd - # *********** 6 ************ - - echo "6. Populating /var" - cd ../var - cp -a ${BOOTIMG}/var/* . - - # *********** 7 ************ - - echo - echo "7. initrd successfully created in ${INITDISK}" - echo - -} - -if [ -d ${BROOT} ] -then - rm -r ${BROOT} - mkdir ${BROOT} -fi - -cd ${BROOT} - -dodirs ${BOOTIMG} ${INITDISK} kernel mnt -echo ">>> Unpacking kernel package" -echo - -tar xjf ${KERNEL} -C ${BROOT}/kernel || exit 1 - -mkbootimg -mkinitrd - - -cd ${BROOT} - -echo ">>> Generating boot.img" -dd if=/dev/zero of=boot.img bs=1024 count=20480 -mke2fs -N8000 boot.img -mount -o loop ${BROOT}/boot.img ${BROOT}/mnt -cp -af ${BOOTIMG}/* ${BROOT}/mnt -umount ${BROOT}/mnt -echo - -echo ">>> Generating initdisk" -dd if=/dev/zero of=initdisk bs=1024 count=4096 -mke2fs initdisk -mount -o loop ${BROOT}/initdisk ${BROOT}/mnt -cp -af ${INITDISK}/* ${BROOT}/mnt -umount ${BROOT}/mnt -gzip -9 initdisk -echo - diff --git a/sys-apps/bootdisk/files/sbin/network b/sys-apps/bootdisk/files/sbin/network deleted file mode 100755 index 5d1452465f3d..000000000000 --- a/sys-apps/bootdisk/files/sbin/network +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -if [ ${#} -lt 3 ] -then - echo "Usage: network [module] [ip] [netmask] [broadcast]" - exit -fi - -modprobe $1 - -if [ ${#} -eq 4 ] -then - ifconfig eth0 $2 netmask $3 broadcast $4 -else - ifconfig eth0 $2 netmask $3 -fi -/sbin/portmap -/sbin/rpc.statd diff --git a/sys-apps/bootdisk/files/sbin/rc b/sys-apps/bootdisk/files/sbin/rc deleted file mode 100755 index bfa6e374bdc0..000000000000 --- a/sys-apps/bootdisk/files/sbin/rc +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -# rc This file is responsible for starting/stopping -# services when the runlevel changes. -cd / -echo "Setting Hostname (gentoo-box)" -/bin/hostname gentoo-box -/bin/umount -n /initrd -/bin/mount /proc -/bin/mount -o remount / -/bin/mount -o remount /initrd -/bin/mount /dev/pts - - |