+diff --git a/src/shutdown.c b/src/shutdown.c
+index 7c5ffcd..b63bddf 100644
+--- a/src/shutdown.c
++++ b/src/shutdown.c
+@@ -46,6 +46,8 @@ char *Version = "@(#) shutdown 2.86-1 31-Jul-2004 miquels@cistron.nl";
+
+ #define MESSAGELEN 256
+
++#define REBOOT_MODE_FILE "/run/reboot_mode"
++
+ int dontshut = 0; /* Don't shutdown, only warn */
+ char down_level[2]; /* What runlevel to go to. */
+ int dosync = 1; /* Sync before reboot or halt */
+@@ -432,6 +434,32 @@ static int needwarning(int wt)
+ return ret;
+ }
+
++static int write_reboot_cmd(const char *line)
++{
++ FILE *f;
++ int r;
++
++ f=fopen(REBOOT_MODE_FILE, "we");
++ if(!f) return -errno;
++
++ if(fputs(line, f)<0){
++ r-=errno;
++ goto final;
++ }
++ fflush(f);
++
++ if((r=ferror(f))!=0){
++ r = (r > 0) ? -r : r;
++ goto final;
++ }
++
++ r=0; /* Success to write */
++
++final:
++ fclose(f);
++ return r;
++}
++
+ /*
+ * Main program.
+ * Process the options and do the final countdown.
+@@ -609,6 +637,10 @@ int main(int argc, char **argv)
+ opts[strlen(message)-1] = 0;
+ if (opts) {
+ init_setenv("INIT_OPTS", opts);
++
++ /* To support the command passing of systemd(for example, 'reboot download'),
++ the command which delivered to reboot syscall is stored into '/run'reboot_mode' file */
++ write_reboot_cmd(opts);
+ }
+ }
+