Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.1:Staging:C
suse-module-tools
regenerate-initrd-posttrans
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File regenerate-initrd-posttrans of Package suse-module-tools
#!/bin/bash # # Packages that install kernels or kernel-modules create a flag # # /run/regenerate-initrd/<kernel image> # # to have the initrd for <kernel image> generated, or # # /run/regenerate-initrd/all # # to have all initrds generated. This script is called from posttrans # and takes care of generating the initrds shopt -s nullglob dir=/run/regenerate-initrd did_mkinitrd_setup=false run_mkinitrd_setup() { if ! $did_mkinitrd_setup; then if test -x /sbin/mkinitrd_setup; then /sbin/mkinitrd_setup fi did_mkinitrd_setup=true fi } if ! test -d "$dir"; then exit 0 fi for f in "$dir"/*; do # check if we are in a build chroot if ! [ -f /etc/fstab -a ! -e /.buildenv -a -x /sbin/mkinitrd ] ; then echo "Please run mkinitrd as soon as your system is complete." >&2 rm "$dir"/* exit 0 fi break done if test -e "$dir/all"; then rm "$dir"/* run_mkinitrd_setup /sbin/mkinitrd exit fi err=0 for f in "$dir"/*; do rm "$f" image=${f##*/} initrd=initrd-${image#*-} if ! test -e "/boot/$image"; then echo "$0: /boot/$image does not exist, initrd won't be generated" continue fi run_mkinitrd_setup if ! /sbin/mkinitrd -k "/boot/$image" -i "/boot/$initrd"; then err=$? fi done exit $err
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor