Magellan Linux

Diff of /trunk/mlivecdbuild/mlivecdbuild2.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 464 by niro, Sat Apr 14 15:23:27 2007 UTC revision 471 by niro, Thu Apr 19 17:03:14 2007 UTC
# Line 52  custom_services() Line 52  custom_services()
52   local services="$2"   local services="$2"
53    
54   case ${cmd} in   case ${cmd} in
55   add|del|default) continue;;   add|del|default)
56     # add given services from profile
57     if [[ -n ${services} ]]
58     then
59     local i
60     for i in ${services}
61     do
62     MROOT="${CDCHROOTDIR}" rc-config ${cmd} ${i} || die "rc ${cmd} ${i}"
63     done
64     fi
65     ;;
66   *) die "custom_services: unkown command ${cmd}";;   *) die "custom_services: unkown command ${cmd}";;
67   esac   esac
   
  # add given services from profile  
  if [[ -n ${services} ]]  
  then  
  local i  
  for i in ${services}  
  do  
  MROOT="${CDCHROOTDIR}" rc-config ${cmd} ${i} || die "rc ${cmd} ${i}"  
  done  
  fi  
68  }  }
69    
70  add_initrc()  add_initrc()
# Line 82  custom_packages() Line 82  custom_packages()
82   local packages="$2"   local packages="$2"
83    
84   case ${cmd} in   case ${cmd} in
85   install|uninstall) continue;;   install|uninstall)
86     if [[ -n ${packages} ]]
87     then
88     :> ${CDCHROOTDIR}/.installrc
89     local i
90     for i in ${packages}
91     do
92     add_initrc "mage install ${i}"
93     done
94     add_initrc "mage clean"
95    
96     # now run the .installrc script
97     mount -t proc proc ${CDCHROOTDIR}/proc || die "mount proc"
98     mount -t sysfs sysfs ${CDCHROOTDIR}/sys || die "mount sys"
99     mount -o bind /dev ${CDCHROOTDIR}/dev || die "mount dev"
100     chroot ${CDCHROOTDIR} /bin/bash -i /.installrc || die "chr00ting"
101     umount ${CDCHROOTDIR}/dev || die "umount dev"
102     umount ${CDCHROOTDIR}/proc || die "umount proc"
103     umount ${CDCHROOTDIR}/sys || die "umount sys"
104     [ -f ${CDCHROOTDIR}/.installrc ] && rm ${CDCHROOTDIR}/.installrc
105     fi
106     ;;
107   *) die "custom_packages: unkown command ${cmd}";;   *) die "custom_packages: unkown command ${cmd}";;
108   esac   esac
   
  if [[ -n ${packages} ]]  
  then  
   
  :> ${CDCHROOTDIR}/.installrc  
  local i  
  for i in ${packages}  
  do  
  add_initrc "mage install ${i}"  
  done  
  add_initrc "mage clean"  
   
  # now run the .installrc script  
  mount -t proc proc ${CDCHROOTDIR}/proc || die "mount proc"  
  mount -t sysfs sysfs ${CDCHROOTDIR}/sys || die "mount sys"  
  mount -o bind /dev ${CDCHROOTDIR}/dev || die "mount dev"  
  chroot ${CDCHROOTDIR} /bin/bash -i /.installrc || die "chr00ting"  
  umount ${CDCHROOTDIR}/dev || die "umount dev"  
  umount ${CDCHROOTDIR}/proc || die "umount proc"  
  umount ${CDCHROOTDIR}/sys || die "umount sys"  
  [ -f ${CDCHROOTDIR}/.installrc ] && rm ${CDCHROOTDIR}/.installrc  
  fi  
109  }  }
110    
111  read_config()  read_config()

Legend:
Removed from v.464  
changed lines
  Added in v.471