summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Xu (Hello71) <alex_y_xu@yahoo.ca>2020-06-26 10:22:24 -0400
committerAlex Xu (Hello71) <alex_y_xu@yahoo.ca>2020-06-26 10:22:24 -0400
commita625357fea99a9818e19d8fc8f281c8b53a3b071 (patch)
tree2629caf95e26e6dc4e116f76bff7f6d3f31aec08
parent47321b14b34ed95579129bdcd7923ac40e6a2935 (diff)
downloadminitramfs-a625357fea99a9818e19d8fc8f281c8b53a3b071.tar.xz
minitramfs-a625357fea99a9818e19d8fc8f281c8b53a3b071.zip
add lastlog
-rw-r--r--cpio_list.txt1
-rwxr-xr-xmake12
2 files changed, 9 insertions, 4 deletions
diff --git a/cpio_list.txt b/cpio_list.txt
index 4a482bb..1befff4 100644
--- a/cpio_list.txt
+++ b/cpio_list.txt
@@ -47,3 +47,4 @@ file /lib64/libnss_files.so.2 /lib64/libnss_files.so.2 0755 0 0
file /root/.ssh/authorized_keys ./authorized_keys 0600 0 0
file /sbin/unlock ./unlock 0755 0 0
file /usr/share/udhcpc/default.script /usr/share/udhcpc/default.script 0755 0 0
+file /var/log/lastlog /dev/null 0644 0 0
diff --git a/make b/make
index 7621a6c..4282f64 100755
--- a/make
+++ b/make
@@ -62,11 +62,15 @@ gen_depfile() {
printf '%s %s %s %s\n' "$type" "$target" "$source" "$args"
# accumulate the dependencies in a list to avoid make bugs.
# there will be no duplicates since the list was previously sorted
- if [ "$type" = file ]; then
- deps="$deps $source"
- # avoid "No rule to make target" when deps disappear
- echo "$source:" >&3
+ if [ "$type" != file ]; then
+ continue
fi
+ case "$source" in
+ /dev/*) continue
+ esac
+ deps="$deps $source"
+ # avoid "No rule to make target" when deps disappear
+ echo "$source:" >&3
done
echo "initramfs.img: $deps" >&3
}