Changeset 5bc19fc for bootscripts/lfs


Ignore:
Timestamp:
08/30/2011 10:54:52 PM (13 years ago)
Author:
Bruce Dubbs <bdubbs@…>
Branches:
10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
Children:
fe1643e
Parents:
c0ad0ec
Message:

Update to linux-3.0.4 and util-linux-2.20.
Fix minor bootscript problems.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@9587 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

Location:
bootscripts/lfs
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • bootscripts/lfs/init.d/cleanfs

    rc0ad0ec r5bc19fc  
    3131# Function to create files/directory on boot.
    3232create_files() {
    33         # Read in the configuration file.
    34         exec 9>&0 < /etc/sysconfig/createfiles
    35                 while read name type perm usr grp dtype maj min junk
    36                 do
    37                         # Ignore comments and blank lines.
    38                         case "${name}" in
    39                                 ""|\#*) continue ;;
    40                         esac
     33   # Read in the configuration file.
     34   exec 9>&0 < /etc/sysconfig/createfiles
     35      while read name type perm usr grp dtype maj min junk
     36      do
     37         # Ignore comments and blank lines.
     38               case "${name}" in
     39            ""|\#*) continue ;;
     40         esac
    4141
    42                         # Ignore existing files.
    43                         if [ ! -e "${name}" ]; then
    44                                 # Create stuff based on its type.
    45                                 case "${type}" in
    46                                         dir)
    47                                                 mkdir "${name}"
    48                                                 ;;
    49                                         file)
    50                                                 :> "${name}"
    51                                                 ;;
    52                                         dev)
    53                                                 case "${dtype}" in
    54                                                         char)
    55                                                                 mknod "${name}" c ${maj} ${min}
    56                                                                 ;;
    57                                                         block)
    58                                                                 mknod "${name}" b ${maj} ${min}
    59                                                                 ;;
    60                                                         pipe)
    61                                                                 mknod "${name}" p
    62                                                                 ;;
    63                                                         *)
    64                                                                 boot_mesg -n "\nUnknown device type: ${dtype}" ${WARNING}
    65                                                                 boot_mesg "" ${NORMAL}
    66                                                                 ;;
    67                                                 esac
    68                                                 ;;
    69                                         *)
    70                                                 boot_mesg -n "\nUnknown type: ${type}" ${WARNING}
    71                                                 boot_mesg "" ${NORMAL}
    72                                                 continue
    73                                                 ;;
    74                                 esac
     42         # Ignore existing files.
     43         if [ ! -e "${name}" ]; then
     44            # Create stuff based on its type.
     45            case "${type}" in
     46               dir)
     47                  mkdir "${name}"
     48                  ;;
     49               file)
     50                  :> "${name}"
     51                  ;;
     52               dev)
     53                  case "${dtype}" in
     54                     char)
     55                        mknod "${name}" c ${maj} ${min}
     56                        ;;
     57                     block)
     58                        mknod "${name}" b ${maj} ${min}
     59                        ;;
     60                     pipe)
     61                        mknod "${name}" p
     62                        ;;
     63                     *)
     64                        boot_mesg -n "\nUnknown device type: ${dtype}" ${WARNING}
     65                        boot_mesg "" ${NORMAL}
     66                        ;;
     67                  esac
     68                  ;;
     69               *)
     70                  boot_mesg -n "\nUnknown type: ${type}" ${WARNING}
     71                  boot_mesg "" ${NORMAL}
     72                  continue
     73                  ;;
     74            esac
    7575
    76                                 # Set up the permissions, too.
    77                                 chown ${usr}:${grp} "${name}"
    78                                 chmod ${perm} "${name}"
    79                         fi
    80                 done
    81         exec 0>&9 9>&-
     76            # Set up the permissions, too.
     77            chown ${usr}:${grp} "${name}"
     78            chmod ${perm} "${name}"
     79         fi
     80      done
     81   exec 0>&9 9>&-
    8282}
    8383
    8484case "${1}" in
    85         start)
    86                 boot_mesg -n "Cleaning file systems:" ${INFO}
     85   start)
     86      boot_mesg -n "Cleaning file systems:" ${INFO}
    8787
    8888      if [ "${SKIPTMPCLEAN}" = "" ]; then
    89                    boot_mesg -n " /tmp" ${NORMAL}
    90                    cd /tmp &&
    91                    find . -xdev -mindepth 1 ! -name lost+found -delete || failed=1
     89         boot_mesg -n " /tmp" ${NORMAL}
     90         cd /tmp &&
     91         find . -xdev -mindepth 1 ! -name lost+found -delete || failed=1
    9292      fi
    9393
    94                 > /var/run/utmp
     94      > /var/run/utmp
    9595
    96                 if grep -q '^utmp:' /etc/group ; then
    97                         chmod 664 /var/run/utmp
    98                         chgrp utmp /var/run/utmp
    99                 fi
     96      if grep -q '^utmp:' /etc/group ; then
     97         chmod 664 /var/run/utmp
     98         chgrp utmp /var/run/utmp
     99      fi
    100100
    101                 (exit ${failed})
    102                 evaluate_retval
     101      (exit ${failed})
     102      evaluate_retval
    103103
    104                 if egrep -qv '^(#|$)' /etc/sysconfig/createfiles 2>/dev/null; then
    105                         boot_mesg "Creating files and directories..."
    106                         create_files
    107                         evaluate_retval
    108                 fi
    109                 ;;
    110         *)
    111                 echo "Usage: ${0} {start}"
    112                 exit 1
    113                 ;;
     104      if egrep -qv '^(#|$)' /etc/sysconfig/createfiles 2>/dev/null; then
     105         boot_mesg "Creating files and directories..."
     106         create_files
     107         evaluate_retval
     108      fi
     109      ;;
     110   *)
     111      echo "Usage: ${0} {start}"
     112      exit 1
     113      ;;
    114114esac
    115115
  • bootscripts/lfs/init.d/mountfs

    rc0ad0ec r5bc19fc  
    5858   stop)
    5959      boot_mesg "Unmounting all other currently mounted file systems..."
    60       umount -a -d -r >/dev/null
     60      umount -a -d -r -t notmpfs >/dev/null
    6161      evaluate_retval
    6262      ;;
  • bootscripts/lfs/sysconfig/createfiles

    rc0ad0ec r5bc19fc  
    99#
    1010# Notes       : The syntax of this file is as follows:
    11 #               if type is equal to "file" or "dir"
    12              <filename> <type> <permissions> <user> <group>
    13 #               if type is equal to "dev"
    14              <filename> <type> <permissions> <user> <group> <devtype> <major> <minor>
     11#     if type is equal to "file" or "dir"
     12      <filename> <type> <permissions> <user> <group>
     13#     if type is equal to "dev"
     14      <filename> <type> <permissions> <user> <group> <devtype> <major> <minor>
    1515#
    16 #               <filename> is the name of the file which is to be created
    17 #               <type> is either file, dir, or dev.
    18 #                       file creates a new file
    19 #                       dir creates a new directory
    20 #                       dev creates a new device
    21 #               <devtype> is either block, char or pipe
    22 #                       block creates a block device
    23 #                       char creates a character deivce
    24 #                       pipe creates a pipe, this will ignore the <major> and <minor> fields
    25 #               <major> and <minor> are the major and minor numbers used for the device.
     16#     <filename> is the name of the file which is to be created
     17#     <type> is either file, dir, or dev.
     18#           file creates a new file
     19#           dir creates a new directory
     20#           dev creates a new device
     21#     <devtype> is either block, char or pipe
     22#           block creates a block device
     23#           char creates a character deivce
     24#           pipe creates a pipe, this will ignore the <major> and <minor> fields
     25#     <major> and <minor> are the major and minor numbers used for the device.
    2626########################################################################
    2727
Note: See TracChangeset for help on using the changeset viewer.