Browse Source

Benjamin Schieder:

move conditional initrd recreation to stone.sh
	device-mapper: use conditional initrd recreation supplied by stone.sh



git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@7752 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc
rocklinux
Benjamin Schieder 18 years ago
parent
commit
6c949d1f9e
3 changed files with 5 additions and 5 deletions
  1. +2
    -2
      package/base/device-mapper/etc_stone.d_mod_dm.sh
  2. +2
    -0
      package/base/sysfiles/stone.sh
  3. +1
    -3
      package/base/sysfiles/stone_mod_hardware.sh

+ 2
- 2
package/base/device-mapper/etc_stone.d_mod_dm.sh

@ -55,6 +55,7 @@ dm_edit () {
run=$?
done
sed -e "s,^$olddevice.*$oldmountpoint.*$oldstatus$,$device\t$mountpoint\t$status," -i /etc/conf/dm/mounts
recreate_initrd=1
return 0
}
@ -76,6 +77,7 @@ dm_add () {
"not encrypted" "status=plain" || return
echo -e "$device\t$mountpoint\t$status" >>/etc/conf/dm/mounts
recreate_initrd=1
}
main() {
@ -119,7 +121,5 @@ modprobe $x # added by mod_dm
[ -e "/sbin/fsck.${fs}" ] && echo "/sbin/fsck.${fs} /sbin/fsck.${fs}"
done < <( mount ) | sort | uniq >>/etc/conf/initrd/initrd_dm
echo "/sbin/fsck /sbin/fsck" >>/etc/conf/initrd/initrd_dm
mkinitrd
}

+ 2
- 0
package/base/sysfiles/stone.sh

@ -22,6 +22,7 @@
#
# --- ROCK-COPYRIGHT-NOTE-END ---
recreate_initrd=0
export SETUPD="${SETUPD:-/etc/stone.d}"
if type -p dialog > /dev/null ; then
export SETUPG="${SETUPG:-dialog}"
@ -67,3 +68,4 @@ else
echo
fi
[ "${recreate_initrd}" == "1" ] && /sbin/mkinitrd

+ 1
- 3
package/base/sysfiles/stone_mod_hardware.sh

@ -111,7 +111,6 @@ set_rtc() {
}
main() {
recreate_initrd=0;
while
devtype=udev
if [ -f /etc/conf/devtype ]; then
@ -143,7 +142,7 @@ main() {
cmd="$cmd `get_initrd_module_cmds`";
cmd="$cmd '' ''";
cmd="$cmd 'Force initrd re-creation now' '/sbin/mkinitrd'";
cmd="$cmd 'Force initrd re-creation now' '/sbin/mkinitrd; recreate_initrd=0'";
cmd="$cmd '' ''";
if [ "$clock_tz" = localtime ] ; then
@ -157,7 +156,6 @@ main() {
eval "$cmd"
do : ; done
[ "${recreate_initrd}" == "1" ] && /sbin/mkinitrd
return
}

Loading…
Cancel
Save