Changeset 476 for trunk/debirf/fs/usr/sbin/make-debirf
- Timestamp:
- May 8, 2007 11:25:32 PM (6 years ago)
- File:
-
- 1 edited
-
trunk/debirf/fs/usr/sbin/make-debirf (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/debirf/fs/usr/sbin/make-debirf
r475 r476 39 39 # exclude aptitude 40 40 mkdir -p "$DEBIRF_ROOT" 41 /usr/sbin/debootstrap --exclude=aptitude --include=initramfs-tools"$DEBIRF_DISTRO" "$DEBIRF_ROOT" "$DEBIRF_MIRROR"41 /usr/sbin/debootstrap --exclude=aptitude "$DEBIRF_DISTRO" "$DEBIRF_ROOT" "$DEBIRF_MIRROR" 42 42 } 43 43 … … 121 121 1) 122 122 DEBIRF_KERNEL_PACKAGE="$1" 123 echo "Profile not specified. Using default profile ('$DEBIRF_PROFILE_DEFAULT')..." 124 DEBIRF_PROFILE="$DEBIRF_PROFILE_DEFAULT" 123 125 ;; 124 126 2) … … 139 141 140 142 # check for debirf profile 141 if [ -z "$DEBIRF_PROFILE" ] ; then 142 echo "Profile not specified." 143 read -p "Use default profile ('$DEBIRF_PROFILE_DEFAULT')? [Y|n]: " OK 144 if [ -z "$OK" -o "${OK/y/Y}" = 'Y' ] ; then 145 DEBIRF_PROFILE="$DEBIRF_PROFILE_DEFAULT" 146 fi 147 fi 148 if [ "$DEBIRF_PROFILE" ] ; then 149 if [ ! -d "$DEBIRF_PROFILE" ] ; then 150 if [ ! -d "$DEBIRF_PROFILED/$DEBIRF_PROFILE" ] ; then 151 failure "Profile '$DEBIRF_PROFILE' not found." 152 else 153 DEBIRF_PROFILE="$DEBIRF_PROFILED/$DEBIRF_PROFILE" 154 fi 155 fi 156 echo "Using profile '$DEBIRF_PROFILE'." 157 DEBIRF_CONF="$DEBIRF_PROFILE/debirf.conf" 158 DEBIRF_PLUGINS="$DEBIRF_PROFILE/plugins.d" 159 fi 143 if [ ! -d "$DEBIRF_PROFILE" ] ; then 144 if [ ! -d "$DEBIRF_PROFILED/$DEBIRF_PROFILE" ] ; then 145 failure "Profile '$DEBIRF_PROFILE' not found." 146 else 147 DEBIRF_PROFILE="$DEBIRF_PROFILED/$DEBIRF_PROFILE" 148 fi 149 fi 150 fi 151 152 DEBIRF_CONF=${DEBIRF_CONF:-"$DEBIRF_PROFILE/debirf.conf"} 153 DEBIRF_PLUGINS=${DEBIRF_PLUGINS:-"$DEBIRF_PROFILE/plugins" 160 154 161 155 # find debirf.conf 162 if [ "$DEBIRF_CONF" ] ; then 163 if [ -f "$DEBIRF_CONF" ] ; then 164 source "$DEBIRF_CONF" 165 else 166 failure "Config file '$DEBIRF_CONF' not found." 167 fi 168 fi 169 170 # find plugin directory 171 if [ "$DEBIRF_PLUGINS" ] ; then 172 if [ ! -d "$DEBIRF_PLUGINS" ] ; then 173 failure "Plugin directory '$DEBIRF_PLUGINS' not found." 174 fi 175 else 176 echo "Plugin directory file not specified." 177 read -p "Continue without plugins? [y|N]: " OK 178 if [ "${OK/y/Y}" != 'Y' ] ; then 179 failure "aborting." 180 fi 181 fi 182 183 # echo 184 # for var in ${!DEBIRF_*}; do 185 # export $var 186 # done 187 # env | /bin/grep "^DEBIRF_" 188 # exit 189 156 [ -f "$DEBIRF_CONF" ] && source "$DEBIRF_CONF" 157 158 # check plugins 159 if [ ! -d foo -o $(ls foo -1 | wc -l) = 0 ] ; then 160 echo "Plugin directory '$DEBIRF_PLUGINS' is empty or does not exist." 161 read -p "Continue? [Y|n]: " OK 162 if [ "$OK" -a "${OK/y/Y}" != 'Y' ] ; then 163 failure "Aborting." 164 fi 165 fi 166 190 167 # create debootstrap root 191 168 if [ -d "$DEBIRF_ROOT" ] ; then
Note: See TracChangeset
for help on using the changeset viewer.

