X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=meta-starlingx%2Fmeta-stx-integ%2Frecipes-core%2Finitrdscripts%2Finitramfs-module-setup-live%2Fsetup-live;fp=meta-starlingx%2Fmeta-stx-integ%2Frecipes-core%2Finitrdscripts%2Finitramfs-module-setup-live%2Fsetup-live;h=0000000000000000000000000000000000000000;hb=6fc6934434f70595536a387ece31bc30141cafb5;hp=dfbd57626e8c34530aec271ef72faf5451dcec0e;hpb=eb1e26510491ba49de693ab3b0498edcb06be6c5;p=pti%2Frtp.git diff --git a/meta-starlingx/meta-stx-integ/recipes-core/initrdscripts/initramfs-module-setup-live/setup-live b/meta-starlingx/meta-stx-integ/recipes-core/initrdscripts/initramfs-module-setup-live/setup-live deleted file mode 100644 index dfbd576..0000000 --- a/meta-starlingx/meta-stx-integ/recipes-core/initrdscripts/initramfs-module-setup-live/setup-live +++ /dev/null @@ -1,76 +0,0 @@ -#/bin/sh - -_UDEV_DAEMON=`udev_daemon` - -setup_enabled() { - return 0 -} - -setup_run() { -ROOT_IMAGE="rootfs.img" -ISOLINUX="" -ROOT_DISK="" -shelltimeout=60 - - if [ -z "$bootparam_root" -o "$bootparam_root" = "/dev/ram0" ]; then - echo "Waiting for removable media..." - udevadm trigger --action=add - udevadm settle - echo "Mounted filesystems" - mount |grep media - C=0 - while true - do - for i in `ls /run/media 2>/dev/null`; do - if [ -f /run/media/$i/$ROOT_IMAGE ] ; then - found="yes" - ROOT_DISK="$i" - break - elif [ -f /run/media/$i/isolinux/$ROOT_IMAGE ]; then - found="yes" - ISOLINUX="isolinux" - ROOT_DISK="$i" - break - fi - done - if [ "$found" = "yes" ]; then - break; - fi - # don't wait for more than $shelltimeout seconds, if it's set - if [ -n "$shelltimeout" ]; then - echo " " $(( $shelltimeout - $C )) - if [ $C -ge $shelltimeout ]; then - echo "..." - echo "Mounted filesystems" - mount | grep media - echo "Available block devices" - cat /proc/partitions - msg "Cannot find $ROOT_IMAGE file in /run/media/* , dropping to a shell " - /bin/sh - fi - udevadm trigger --action=add - udevadm settle - echo "Mounted filesystems" - mount |grep media - C=$(( C + 1 )) - fi - sleep 1 - done - killall -9 "${_UDEV_DAEMON##*/}" 2>/dev/null - # The existing rootfs module has no support for rootfs images. Assign the rootfs image. - bootparam_root="/run/media/$ROOT_DISK/$ISOLINUX/$ROOT_IMAGE" - fi - - if [ "$bootparam_LABEL" != "boot" -a -f /init.d/$bootparam_LABEL.sh ] ; then - if [ -f /run/media/$ROOT_DISK/$ISOLINUX/$ROOT_IMAGE ] ; then - ./init.d/$bootparam_LABEL.sh $ROOT_DISK/$ISOLINUX $ROOT_IMAGE $video_mode $vga_mode $console_params - else - msg "Could not find $bootparam_LABEL script" - /bin/sh - fi - - # If we're getting here, we failed... - msg "Target $bootparam_LABEL failed" - /bin/sh - fi -}