mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-22 21:18:28 +03:00
treewide: replace several /sbin paths by /bin
This commit is contained in:
parent
131fca0a85
commit
1afd250676
@ -80,7 +80,7 @@ in
|
|||||||
preStart = ''
|
preStart = ''
|
||||||
mkdir -p -m 0755 /afs
|
mkdir -p -m 0755 /afs
|
||||||
mkdir -m 0700 -p ${cfg.cacheDirectory}
|
mkdir -m 0700 -p ${cfg.cacheDirectory}
|
||||||
${pkgs.kmod}/sbin/insmod ${openafsPkgs}/lib/openafs/libafs-*.ko || true
|
${pkgs.kmod}/bin/insmod ${openafsPkgs}/lib/openafs/libafs-*.ko || true
|
||||||
${openafsPkgs}/sbin/afsd -confdir ${afsConfig} -cachedir ${cfg.cacheDirectory} ${if cfg.sparse then "-dynroot-sparse" else "-dynroot"} -fakestat -afsdb
|
${openafsPkgs}/sbin/afsd -confdir ${afsConfig} -cachedir ${cfg.cacheDirectory} ${if cfg.sparse then "-dynroot-sparse" else "-dynroot"} -fakestat -afsdb
|
||||||
${openafsPkgs}/bin/fs setcrypt ${if cfg.crypt then "on" else "off"}
|
${openafsPkgs}/bin/fs setcrypt ${if cfg.crypt then "on" else "off"}
|
||||||
'';
|
'';
|
||||||
|
@ -135,13 +135,13 @@ let
|
|||||||
}
|
}
|
||||||
''
|
''
|
||||||
# Create a /boot EFI partition with 40M
|
# Create a /boot EFI partition with 40M
|
||||||
${pkgs.gptfdisk}/sbin/sgdisk -G /dev/vda
|
${pkgs.gptfdisk}/bin/sgdisk -G /dev/vda
|
||||||
${pkgs.gptfdisk}/sbin/sgdisk -a 1 -n 1:34:2047 -c 1:"BIOS Boot Partition" -t 1:ef02 /dev/vda
|
${pkgs.gptfdisk}/bin/sgdisk -a 1 -n 1:34:2047 -c 1:"BIOS Boot Partition" -t 1:ef02 /dev/vda
|
||||||
${pkgs.gptfdisk}/sbin/sgdisk -a 512 -N 2 -c 2:"EFI System" -t 2:ef00 /dev/vda
|
${pkgs.gptfdisk}/bin/sgdisk -a 512 -N 2 -c 2:"EFI System" -t 2:ef00 /dev/vda
|
||||||
${pkgs.gptfdisk}/sbin/sgdisk -A 1:set:1 /dev/vda
|
${pkgs.gptfdisk}/bin/sgdisk -A 1:set:1 /dev/vda
|
||||||
${pkgs.gptfdisk}/sbin/sgdisk -A 2:set:2 /dev/vda
|
${pkgs.gptfdisk}/bin/sgdisk -A 2:set:2 /dev/vda
|
||||||
${pkgs.gptfdisk}/sbin/sgdisk -h 2 /dev/vda
|
${pkgs.gptfdisk}/bin/sgdisk -h 2 /dev/vda
|
||||||
${pkgs.gptfdisk}/sbin/sgdisk -C /dev/vda
|
${pkgs.gptfdisk}/bin/sgdisk -C /dev/vda
|
||||||
${pkgs.utillinux}/bin/sfdisk /dev/vda -A 2
|
${pkgs.utillinux}/bin/sfdisk /dev/vda -A 2
|
||||||
. /sys/class/block/vda2/uevent
|
. /sys/class/block/vda2/uevent
|
||||||
mknod /dev/vda2 b $MAJOR $MINOR
|
mknod /dev/vda2 b $MAJOR $MINOR
|
||||||
@ -151,11 +151,11 @@ let
|
|||||||
${pkgs.mtools}/bin/mlabel -i /dev/vda2 ::boot
|
${pkgs.mtools}/bin/mlabel -i /dev/vda2 ::boot
|
||||||
|
|
||||||
# Mount /boot; load necessary modules first.
|
# Mount /boot; load necessary modules first.
|
||||||
${pkgs.kmod}/sbin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/nls/nls_cp437.ko.xz || true
|
${pkgs.kmod}/bin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/nls/nls_cp437.ko.xz || true
|
||||||
${pkgs.kmod}/sbin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/nls/nls_iso8859-1.ko.xz || true
|
${pkgs.kmod}/bin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/nls/nls_iso8859-1.ko.xz || true
|
||||||
${pkgs.kmod}/sbin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/fat/fat.ko.xz || true
|
${pkgs.kmod}/bin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/fat/fat.ko.xz || true
|
||||||
${pkgs.kmod}/sbin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/fat/vfat.ko.xz || true
|
${pkgs.kmod}/bin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/fat/vfat.ko.xz || true
|
||||||
${pkgs.kmod}/sbin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/efivarfs/efivarfs.ko.xz || true
|
${pkgs.kmod}/bin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/efivarfs/efivarfs.ko.xz || true
|
||||||
mkdir /boot
|
mkdir /boot
|
||||||
mount /dev/vda2 /boot
|
mount /dev/vda2 /boot
|
||||||
|
|
||||||
@ -370,7 +370,7 @@ in
|
|||||||
boot.initrd.extraUtilsCommands =
|
boot.initrd.extraUtilsCommands =
|
||||||
''
|
''
|
||||||
# We need mke2fs in the initrd.
|
# We need mke2fs in the initrd.
|
||||||
copy_bin_and_libs ${pkgs.e2fsprogs}/sbin/mke2fs
|
copy_bin_and_libs ${pkgs.e2fsprogs}/bin/mke2fs
|
||||||
'';
|
'';
|
||||||
|
|
||||||
boot.initrd.postDeviceCommands =
|
boot.initrd.postDeviceCommands =
|
||||||
|
@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
|
|||||||
buildInputs = [ popt libuuid liburcu lttng-ust libxml2 ];
|
buildInputs = [ popt libuuid liburcu lttng-ust libxml2 ];
|
||||||
|
|
||||||
prePatch = ''
|
prePatch = ''
|
||||||
sed -e "s|/sbin/modprobe|${kmod}/sbin/modprobe|g" \
|
sed -e "s|/sbin/modprobe|${kmod}/bin/modprobe|g" \
|
||||||
-i src/bin/lttng-sessiond/modprobe.c
|
-i src/bin/lttng-sessiond/modprobe.c
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ let
|
|||||||
echo "stripping FHS paths in \`$mf'..."
|
echo "stripping FHS paths in \`$mf'..."
|
||||||
sed -i "$mf" -e 's|/usr/bin/||g ; s|/bin/||g ; s|/sbin/||g'
|
sed -i "$mf" -e 's|/usr/bin/||g ; s|/bin/||g ; s|/sbin/||g'
|
||||||
done
|
done
|
||||||
sed -i Makefile -e 's|= depmod|= ${kmod}/sbin/depmod|'
|
sed -i Makefile -e 's|= depmod|= ${kmod}/bin/depmod|'
|
||||||
'';
|
'';
|
||||||
|
|
||||||
configurePhase = ''
|
configurePhase = ''
|
||||||
@ -188,7 +188,7 @@ let
|
|||||||
find -empty -type d -delete
|
find -empty -type d -delete
|
||||||
|
|
||||||
# Remove reference to kmod
|
# Remove reference to kmod
|
||||||
sed -i Makefile -e 's|= ${kmod}/sbin/depmod|= depmod|'
|
sed -i Makefile -e 's|= ${kmod}/bin/depmod|= depmod|'
|
||||||
'' else optionalString installsFirmware ''
|
'' else optionalString installsFirmware ''
|
||||||
make firmware_install $makeFlags "''${makeFlagsArray[@]}" \
|
make firmware_install $makeFlags "''${makeFlagsArray[@]}" \
|
||||||
$installFlags "''${installFlagsArray[@]}"
|
$installFlags "''${installFlagsArray[@]}"
|
||||||
|
@ -21,7 +21,7 @@ buildEnv {
|
|||||||
# kernel version number, otherwise depmod will use `uname -r'.
|
# kernel version number, otherwise depmod will use `uname -r'.
|
||||||
if test -w $out/lib/modules/$kernelVersion; then
|
if test -w $out/lib/modules/$kernelVersion; then
|
||||||
rm -f $out/lib/modules/$kernelVersion/modules.*
|
rm -f $out/lib/modules/$kernelVersion/modules.*
|
||||||
${kmod}/sbin/depmod -b $out -a $kernelVersion
|
${kmod}/bin/depmod -b $out -a $kernelVersion
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
|
|||||||
substituteInPlace configure --replace /usr/bin/uname ${coreutils}/bin/uname
|
substituteInPlace configure --replace /usr/bin/uname ${coreutils}/bin/uname
|
||||||
substituteInPlace configure --replace /usr/bin/file ${file}/bin/file
|
substituteInPlace configure --replace /usr/bin/file ${file}/bin/file
|
||||||
substituteInPlace src/devices/nm-device.c --replace /usr/bin/ping ${inetutils}/bin/ping
|
substituteInPlace src/devices/nm-device.c --replace /usr/bin/ping ${inetutils}/bin/ping
|
||||||
substituteInPlace src/NetworkManagerUtils.c --replace /sbin/modprobe /run/current-system/sw/sbin/modprobe
|
substituteInPlace src/NetworkManagerUtils.c --replace /sbin/modprobe /run/current-system/sw/bin/modprobe
|
||||||
substituteInPlace data/84-nm-drivers.rules \
|
substituteInPlace data/84-nm-drivers.rules \
|
||||||
--replace /bin/sh ${stdenv.shell}
|
--replace /bin/sh ${stdenv.shell}
|
||||||
substituteInPlace data/85-nm-unmanaged.rules \
|
substituteInPlace data/85-nm-unmanaged.rules \
|
||||||
|
@ -23,10 +23,10 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
substituteInPlace "configure" \
|
substituteInPlace "configure" \
|
||||||
--replace "/sbin/sysctl" "${procps}/sbin/sysctl"
|
--replace "/sbin/sysctl" "${procps}/bin/sysctl"
|
||||||
substituteInPlace "src/nm-openconnect-service.c" \
|
substituteInPlace "src/nm-openconnect-service.c" \
|
||||||
--replace "/usr/sbin/openconnect" "${openconnect}/sbin/openconnect" \
|
--replace "/usr/sbin/openconnect" "${openconnect}/bin/openconnect" \
|
||||||
--replace "/sbin/modprobe" "${kmod}/sbin/modprobe"
|
--replace "/sbin/modprobe" "${kmod}/bin/modprobe"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
@ -27,10 +27,10 @@ stdenv.mkDerivation rec {
|
|||||||
substituteInPlace "configure" \
|
substituteInPlace "configure" \
|
||||||
--replace "/sbin/sysctl" "${procps}/sbin/sysctl"
|
--replace "/sbin/sysctl" "${procps}/sbin/sysctl"
|
||||||
substituteInPlace "src/nm-openvpn-service.c" \
|
substituteInPlace "src/nm-openvpn-service.c" \
|
||||||
--replace "/sbin/openvpn" "${openvpn}/sbin/openvpn" \
|
--replace "/sbin/openvpn" "${openvpn}/bin/openvpn" \
|
||||||
--replace "/sbin/modprobe" "${kmod}/sbin/modprobe"
|
--replace "/sbin/modprobe" "${kmod}/bin/modprobe"
|
||||||
substituteInPlace "properties/auth-helpers.c" \
|
substituteInPlace "properties/auth-helpers.c" \
|
||||||
--replace "/sbin/openvpn" "${openvpn}/sbin/openvpn"
|
--replace "/sbin/openvpn" "${openvpn}/bin/openvpn"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
@ -24,10 +24,10 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
substituteInPlace "configure" \
|
substituteInPlace "configure" \
|
||||||
--replace "/sbin/sysctl" "${procps}/sbin/sysctl"
|
--replace "/sbin/sysctl" "${procps}/bin/sysctl"
|
||||||
substituteInPlace "src/nm-vpnc-service.c" \
|
substituteInPlace "src/nm-vpnc-service.c" \
|
||||||
--replace "/sbin/vpnc" "${vpnc}/sbin/vpnc" \
|
--replace "/sbin/vpnc" "${vpnc}/bin/vpnc" \
|
||||||
--replace "/sbin/modprobe" "${kmod}/sbin/modprobe"
|
--replace "/sbin/modprobe" "${kmod}/bin/modprobe"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
Loading…
Reference in New Issue
Block a user