Changeset 755
- Timestamp:
- Dec 3, 2007 12:43:52 AM (5 years ago)
- Location:
- trunk/debirf
- Files:
-
- 3 edited
-
debian/changelog (modified) (1 diff)
-
fs/usr/bin/make-debirf (modified) (4 diffs)
-
fs/usr/share/debirf/plugins/install-kernel (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/debirf/debian/changelog
r747 r755 4 4 * added ability to run make-debirf with fakechroot ('-f' option). there are problems creating the device tree with this method, though, so it is still underdevelopment. 5 5 * modified debootstrap, plugin run-parts, and debirf_exec to also use fakechroot 6 * being root *should* no longer be necessary to make-debirf, therefore make-debirf wasmoved to /usr/bin/7 * debirf can now function with stock debian kernels (as of 2.6.22), in rootfs6 * being root *should* no longer be necessary to make-debirf, therefore make-debirf has been moved to /usr/bin/ 7 * debirf can now function in rootfs with stock debian kernels (as of 2.6.22) 8 8 * removed /var/lib/debirf 9 9 * removed /etc/debirf in favor of doc/example-profiles 10 10 * added xkiosk plugin to start X session with browser on startup 11 * added xkiosk profile 12 * added getopt for command line argument checking 13 * added command line arguments to skip some checking/user interaction 14 * can now pass kernel package name to make-debirf, instead of just deb, although proper package checking is not fully working 11 15 12 -- Jameson Rollins <jrollins@fifthhorseman.net> Sun, 02 Dec 2007 12:00:32-050016 -- Jameson Rollins <jrollins@fifthhorseman.net> Mon, 03 Dec 2007 00:40:46 -0500 13 17 14 18 debirf (0.5) unstable; urgency=low -
trunk/debirf/fs/usr/bin/make-debirf
r747 r755 27 27 cat <<EOF 28 28 Usage: $CMD [options] profile kernel-image.deb|kernel-package-name 29 Build a debirf diskless image. 30 'profile' is a path to a debirf profile directory. 29 31 30 32 options: 31 -f fakechroot build (other wise requires being root) 33 -h|--help this help message 34 -f|--fakechroot fakechroot build (other wise requires being root) 35 -c|--check-vars check variables before make 36 -n|--new create new root, even if old one exists 37 -o|--overwrite debootstrap on top of old root if it exists 38 -s|--skip skip debootstrap step if old root exists 32 39 EOF 33 40 } … … 39 46 40 47 create_debootstrap() { 41 msg "creating debirf root..."42 # include initramfs-tools because they'll be handy43 48 mkdir -p "$DEBIRF_ROOT" 44 49 if [ "$FAKECHROOT_BUILD" = 'true' ] ; then … … 176 181 ### MAIN 177 182 178 #trap umount_proc-sys EXIT 179 180 if [ "$1" = '-h' -o "$1" = '--help' ] ; then 183 # option parsing 184 TEMP=$(getopt --options -hfcnos --longoptions help,fakechroot,check-vars,new,overwrite,skip -n "$CMD" -- "$@") 185 186 if [ $? != 0 ] ; then 187 echo "Invalid options." >&2 181 188 usage 182 exit 0 183 fi 184 185 case $# in 186 2) 187 DEBIRF_PROFILE="$1" 188 DEBIRF_KERNEL_PACKAGE="$2" 189 ;; 190 3) 191 if [ "$1" = '-f' ] ; then 189 exit 1 190 fi 191 192 # Note the quotes around `$TEMP': they are essential! 193 eval set -- "$TEMP" 194 195 while true ; do 196 case "$1" in 197 -h|--help) 198 usage 199 exit 0 200 ;; 201 -f|--fakechroot) 192 202 echo "Using fakechroot build." 193 203 FAKECHROOT_BUILD=true 194 else 195 failure "Improper input arguments." 196 fi 197 DEBIRF_PROFILE="$2" 198 DEBIRF_KERNEL_PACKAGE="$3" 199 ;; 200 *) 201 echo "Improper number of input arguments." 202 usage 203 exit 1 204 ;; 205 esac 204 shift 1 205 ;; 206 -c|--check-vars) 207 CHECK_VARS=true 208 shift 1 209 ;; 210 -n|--new) 211 WRITE_MODE=rewrite 212 shift 1 213 ;; 214 -o|--overwrite) 215 WRITE_MODE=overwrite 216 shift 1 217 ;; 218 -s|--skip) 219 WRITE_MODE=skip 220 shift 1 221 ;; 222 --) 223 shift 224 ;; 225 *) 226 if (( $# < 1 )) ; then 227 echo "Improper number of input arguments." 228 usage 229 exit 1 230 fi 231 DEBIRF_PROFILE="$1" 232 DEBIRF_KERNEL_PACKAGE="$2" 233 break 234 ;; 235 esac 236 done 206 237 207 238 # check specified kernel package exists … … 263 294 264 295 # check variables 265 echo "Debirf variables:" 266 for var in ${!DEBIRF_*}; do 267 if [ $var ] ; then 268 export $var 269 else 270 failure "Variable '$var' not properly set." 271 fi 272 done 273 env | /bin/grep "^DEBIRF_" 274 read -p "enter to continue: " OK 296 if [ "$CHECK_VARS" ] ; then 297 echo "Debirf variables:" 298 for var in ${!DEBIRF_*}; do 299 if [ $var ] ; then 300 export $var 301 else 302 failure "Variable '$var' not properly set." 303 fi 304 done 305 env | /bin/grep "^DEBIRF_" 306 read -p "enter to continue: " OK 307 fi 275 308 276 309 # create debootstrap root 277 310 if [ -d "$DEBIRF_ROOT" ] ; then 278 311 echo "Directory $DEBIRF_ROOT already exists." 279 echo "Select one of the following:" 280 select foo in 'rewrite' 'overwrite' 'skip' 'exit' ; do 281 case "$foo" in 282 'wipe & rewrite') 283 msg "clearing old debirf root..." 284 rm -rf "$DEBIRF_ROOT" 285 create_debootstrap 286 ;; 287 'overwrite') 288 create_debootstrap 289 ;; 290 'skip') 291 ;; 292 *) 293 failure "aborting." 294 ;; 295 esac 296 break 297 done 312 if [ -z "$WRITE_MODE" ] ; then 313 echo "Select one of the following:" 314 select foo in 'new' 'overwrite' 'skip' 'exit' ; do 315 case "$foo" in 316 'new') 317 WRITE_MODE=rewrite 318 ;; 319 'overwrite') 320 WRITE_MODE=overwrite 321 ;; 322 'skip') 323 WRITE_MODE=skip 324 ;; 325 *) 326 failure "aborting." 327 ;; 328 esac 329 break 330 done 331 fi 298 332 else 299 create_debootstrap 300 fi 333 WRITE_MODE=new 334 fi 335 case "$WRITE_MODE" in 336 'new') 337 msg "creating debirf root..." 338 create_debootstrap 339 ;; 340 'rewrite') 341 msg "clearing old debirf root..." 342 rm -rf "$DEBIRF_ROOT" 343 msg "creating debirf root..." 344 create_debootstrap 345 ;; 346 'overwrite') 347 msg "overwriting old debirf root..." 348 create_debootstrap 349 ;; 350 'skip') 351 msg "skipping debootstrap..." 352 ;; 353 *) 354 failure "aborting." 355 ;; 356 esac 301 357 302 358 setup_debirf_info -
trunk/debirf/fs/usr/share/debirf/plugins/install-kernel
r747 r755 1 #!/bin/ sh1 #!/bin/bash 2 2 3 3 # debirf plugin: install-kernel … … 26 26 27 27 install_kernel_apt() { 28 debirf_exec apt-get --assume-yes --force-yes -finstall "$1"28 debirf_exec apt-get --assume-yes install "$1" 29 29 } 30 30 … … 33 33 cat >"$DEBIRF_ROOT/etc/kernel-img.conf" <<EOF 34 34 # debirf: default kernel-img options: 35 do_symlinks = yes35 do_symlinks = no 36 36 do_bootloader = no 37 do_initrd = yes 37 warn_initrd = no 38 silent_modules = yes 38 39 EOF 39 40
Note: See TracChangeset
for help on using the changeset viewer.

